p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5

Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 5th, 2006, 09:25 AM
Authorized User
 
Join Date: Sep 2005
Location: Karachi, , Pakistan.
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Email in asp.net

Hi,
I am making an email group like yahoo or msn groups in asp.net, in which i want to receive email from any where and then i want to send it to all user which are in group and also display the email at group's page how i can do this please help,
thanks in advance

asif
__________________
asif
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old January 5th, 2006, 01:35 PM
Friend of Wrox
Points: 4,166, Level: 27
Points: 4,166, Level: 27 Points: 4,166, Level: 27 Points: 4,166, Level: 27
Activity: 12%
Activity: 12% Activity: 12% Activity: 12%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,328
Thanks: 0
Thanked 1 Time in 1 Post
Default

There are plenty of examples on line if you just take the time to search a little. Once you have tried something and are having problems, then we can help.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old January 6th, 2006, 10:23 AM
Authorized User
 
Join Date: Sep 2005
Location: Karachi, , Pakistan.
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for your suggestion but if you can sent me some links i will very thankful to you

asif
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old February 23rd, 2006, 07:05 AM
Registered User
 
Join Date: Feb 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
I am new to this forum & asp.net.
Iam trying to write a web-based application to read my emails through webpage(pop account). I had done this in ASP using CDO session.
Now what i thought is we can do this much easily in ASP.NET(System.Web.mail), however this turned false. I tried system.net through which i could get the no of emails etc. But i cannot see or display the messages in the browser or can say cannot extract the body of the message.So can anybody help me on that.I do not want to use any commercial components.

THE CODE I AM USING GOT THROUGH SOME WEBSITE works well
Code:
Imports System
Imports System.Text
Imports System.Net
Public Class email
    Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region
    Private tcpC As New Sockets.TcpClient
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ReadMail("mail.calorisplanitia.com", "abc@calorisplanitia.com", "password")
    End Sub

    ' send command strings and return the response
    Function SendCommand(ByRef netstream As System.Net.Sockets.NetworkStream, ByVal sToSend As String)
        Dim bData() As Byte = Encoding.ASCII.GetBytes(sToSend.ToCharArray)
        netstream.Write(bData, 0, bData.Length())
        Return GetResponse(netstream)
    End Function

    ' check if there is a response to get and return it
    Function GetResponse(ByRef netstream As System.Net.Sockets.NetworkStream)
        Dim bytes(tcpC.ReceiveBufferSize) As Byte
        Dim ret As Integer = netstream.Read(bytes, 0, bytes.Length)
        ' Returns the data received
        Dim returndata As String = Encoding.ASCII.GetString(bytes)
        Return returndata
    End Function
    Function ReadMail(ByVal host As String, ByVal user As String, ByVal pass As String)
        ' initialise objects
        Dim netstream As System.Net.Sockets.NetworkStream
        Dim thisResponse As String
        ' open connection to server
        Try
            tcpC.Connect(host, 110)
        Catch ex As Exception
            Response.Write("Error connecting to host: " & ex.Message & " - Please check your details and try again")
            Response.End()
        End Try
        ' get response
        netstream = tcpC.GetStream()
        thisResponse = GetResponse(netstream)
        ' enter user name
        thisResponse = SendCommand(netstream, "user " & user & vbCrLf)
        ' enter password
        thisResponse = SendCommand(netstream, "pass " & pass & vbCrLf)
        ' check if logged in ok
        If Not Left(thisResponse, 4) = "-ERR" Then
            Response.Write("Logged in OK <BR>")
        Else
            Response.Write("Error logging in, check your user details and try again<BR>")
            Response.Write("<P>" & thisResponse & "</p>")
            Response.End()
        End If
        thisResponse = SendCommand(netstream, "stat" & vbCrLf)
        Dim tmpArray() As String
        tmpArray = Split(thisResponse, " ")
        Dim thisMess As Integer
        Dim numMess As String = tmpArray(1)
        Response.Write("")
        thisResponse = ""
        If CInt(numMess) > 0 Then
            Response.Write("Messages: " & numMess & "<br>")
            For thisMess = 1 To CInt(numMess)
                thisResponse += Replace(SendCommand(netstream, "top " & thisMess & " 10" & vbCrLf), vbCrLf, "<br>")
            Next
        Else
            Response.Write("Messages: None" & "<br>")
        End If
        thisResponse += Replace(SendCommand(netstream, "stat" & vbCrLf), vbCrLf, "<br>")
        tmpArray = Split(thisResponse, "+OK")
        Response.Write(thisResponse & "<br>--------------------------------------------<br>")
        Dim msg As Integer
        For msg = 1 To tmpArray.Length - 1
            Response.Write("<h3>#" & msg & "</h3><pre>" & tmpArray(msg) & "</pre>")
        Next
        ' close connection
        thisResponse = SendCommand(netstream, "QUIT" & vbCrLf)
        tcpC.Close()
    End Function
End Class
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old September 21st, 2006, 08:31 AM
Authorized User
 
Join Date: Sep 2006
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How to get addresses in contacts..using this code

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Email in ASP.NET Manoj Bisht ASP.NET 1.0 and 1.1 Professional 1 September 28th, 2007 08:57 AM
How to Sending an email in asp.net 2.0 using C# Bashu C# 2005 4 August 14th, 2007 04:29 AM
Email in asp.net asif_sharif ASP.NET 1.0 and 1.1 Basics 0 January 3rd, 2006 11:48 AM
email thru asp.net kale_tushar ASP.NET 1.1 0 January 3rd, 2005 09:39 AM
the email of asp.net calvinpost ASP.NET 1.x and 2.0 Application Design 3 March 28th, 2004 09:53 AM



All times are GMT -4. The time now is 09:32 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc