Mail Send on GoDaddy Server By Classic ASP page

Send mail on GoDaddy Server.
this code is in vb.net 3.5 framework

1)  response.redirect page from aspx to asp page ,
     pass parameter by query string .
---------------------
Response.Redirect("RequestPasswordMailSend.asp?emailto=" + txtRegEmailId.Text.Trim + "&password=" + Password)
----------------------


2) get parameter by querystring on classic asp page.

---------------------
<%
    strMessage = "Your Password is : " & Request.QueryString("password")
    'uncomment to see body of message
    'Response.Write strMessage
    Set myMail=CreateObject("CDO.Message")
    myMail.Subject="Password Recovery "
    myMail.From="[email protected]"
    myMail.To=Request.QueryString("emailto")
    mymail.BCC="[email protected]"
    myMail.TextBody=strMessage
    myMail.Send
    set myMail=nothing
    Response.Redirect "yourPagename.aspx?mail=true"
%>
-----------------------

after mail send again page redirect to aspx page with parameter .

3) get parameter in aspx page on load for result.

----------------------------
 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            If Not String.IsNullOrEmpty(Request.QueryString("mail")) Then
                If Request.QueryString("mail") = "true" Then

                    lblmsg.Text = "Your password has been sent to you"
                    txtRegEmailId.Text = ""
                Else

                    lblmsg.Text = "Your password can not sent to you"
                    txtRegEmailId.Text = ""

                End If
            End If
        End If
    End Sub
----------------------------

--------------------------------------------------------------------------------------------------------
this will send mail from godaddy server.
2 file attached with this blog.
thank you

Ebook Download
View all
Learn
View all