sending e-mails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hkarthik
    New Member
    • Jan 2007
    • 34

    #1

    sending e-mails

    hi,

    how do we send e-mails from ASP.Net. I tried it this way

    " message.From = TextBox1.Text
    message.To = TextBox2.Text
    message.Cc = TextBox3.Text
    message.Bcc = TextBox5.Text
    message.Subject = TextBox6.Text
    message.Body = TextBox4.Text
    message.BodyFor mat = MailFormat.Html
    SmtpMail.SmtpSe rver = "smtpserver name"
    SmtpMail.Send(m essage)
    Response.Flush( )
    Label6.Text = "Your email has been sent" "


    some of the suggestions that i got was ,your message.From and your smtpserver name should be a valid one. can any one help me by giving some suggestions regarding this.
  • radcaesar
    Recognized Expert Contributor
    • Sep 2006
    • 759

    #2
    Not applicable at all costs.

    Gmail offers SMTP server to send mail from any network for any email address

    :)

    Originally posted by hkarthik
    hi,

    how do we send e-mails from ASP.Net. I tried it this way

    " message.From = TextBox1.Text
    message.To = TextBox2.Text
    message.Cc = TextBox3.Text
    message.Bcc = TextBox5.Text
    message.Subject = TextBox6.Text
    message.Body = TextBox4.Text
    message.BodyFor mat = MailFormat.Html
    SmtpMail.SmtpSe rver = "smtpserver name"
    SmtpMail.Send(m essage)
    Response.Flush( )
    Label6.Text = "Your email has been sent" "


    some of the suggestions that i got was ,your message.From and your smtpserver name should be a valid one. can any one help me by giving some suggestions regarding this.

    Comment

    • radcaesar
      Recognized Expert Contributor
      • Sep 2006
      • 759

      #3
      Hi,

      Sorry for my previous RE. When we mention the SMTP server name, it checks the To-Email-id with that SMTP Server. If the ID not exists, the SMTP will throw exception of invalid user.

      :)


      Originally posted by hkarthik
      hi,

      how do we send e-mails from ASP.Net. I tried it this way

      " message.From = TextBox1.Text
      message.To = TextBox2.Text
      message.Cc = TextBox3.Text
      message.Bcc = TextBox5.Text
      message.Subject = TextBox6.Text
      message.Body = TextBox4.Text
      message.BodyFor mat = MailFormat.Html
      SmtpMail.SmtpSe rver = "smtpserver name"
      SmtpMail.Send(m essage)
      Response.Flush( )
      Label6.Text = "Your email has been sent" "


      some of the suggestions that i got was ,your message.From and your smtpserver name should be a valid one. can any one help me by giving some suggestions regarding this.

      Comment

      Working...