HOW TO: Send email using System.Net.Mail

Rate It (28)

Last post 08-01-2007 8:01 AM by Johnny be good. 173 replies.

Sort Posts:

  • Re: HOW TO: Send email using System.Net.Mail

    09-20-2006, 10:22 PM
    Locked
    • Participant
      1,087 point Participant
    • Ez416
    • Member since 03-31-2006, 7:19 AM
    • Posts 600

    i've added this script below (based on your class file you have told me)

    mSmtpClient.Send(mMailMessage)

    mMailMessage.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure

     

    ez
  • Re: HOW TO: Send email using System.Net.Mail

    09-25-2006, 7:49 PM
    Locked
    • Participant
      1,087 point Participant
    • Ez416
    • Member since 03-31-2006, 7:19 AM
    • Posts 600
    What can you say StrongType?
    ez
  • Re: HOW TO: Send email using System.Net.Mail

    09-26-2006, 12:11 AM
    Locked
    • Member
      5 point Member
    • mememe12
    • Member since 09-26-2006, 3:40 AM
    • Posts 1

    if i want to send email to 10 people.. but i wanted to hide the receiver address..

    means the receiver can only see his own address in the to: column..

    is it looping the email address from database? ais there a way to do it? any tutorial?

  • Re: HOW TO: Send email using System.Net.Mail

    09-26-2006, 8:08 AM
    Locked
    • All-Star
      30,698 point All-Star
    • StrongTypes
    • Member since 12-13-2005, 4:21 PM
    • California
    • Posts 6,007
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs
    mememe12:

    if i want to send email to 10 people.. but i wanted to hide the receiver address..

    means the receiver can only see his own address in the to: column..

    is it looping the email address from database? ais there a way to do it? any tutorial?

    Just loop through all the email addresses and send the emails 1 at a time.

  • Re: HOW TO: Send email using System.Net.Mail

    09-26-2006, 8:39 AM
    Locked
    • Member
      15 point Member
    • sansrin
    • Member since 09-26-2006, 5:46 AM
    • Posts 3
    please send me
  • Re: HOW TO: Send email using System.Net.Mail

    09-26-2006, 9:09 AM
    Locked
    • All-Star
      30,698 point All-Star
    • StrongTypes
    • Member since 12-13-2005, 4:21 PM
    • California
    • Posts 6,007
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs
    sansrin:
    please send me
    Your reply makes no sense.
  • Re: HOW TO: Send email using System.Net.Mail

    09-26-2006, 12:04 PM
    Locked
    • All-Star
      30,698 point All-Star
    • StrongTypes
    • Member since 12-13-2005, 4:21 PM
    • California
    • Posts 6,007
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    Ez416:
    What can you say StrongType?

    I can say a lot of things.

    The dog is white.

    The house is on fire.

    The world is round.

    As for your issue, it's probably the mail server not supporting DeliveryNotificationOptions. Have you tried sending it to another mail server?

  • Re: HOW TO: Send email using System.Net.Mail

    09-26-2006, 12:12 PM
    Locked
    • All-Star
      18,400 point All-Star
    • PeterBrunone
    • Member since 06-19-2002, 9:15 AM
    • I'm standing behind you.
    • Posts 3,683
    • TrustedFriends-MVPs

    StrongTypes:
    sansrin:
    please send me
    Your reply makes no sense.

    He must be referring to the new HumanAttachment class in .NET 3.0.

     

    Peter Brunone
    MS MVP, ASP.NET
    Founder, EasyListBox.com
    Do the impossible, and go home early.
  • Re: HOW TO: Send email using System.Net.Mail

    09-26-2006, 3:09 PM
    Locked
    • All-Star
      30,698 point All-Star
    • StrongTypes
    • Member since 12-13-2005, 4:21 PM
    • California
    • Posts 6,007
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    PeterBrunone:
    He must be referring to the new HumanAttachment class in .NET 3.0.

    Ah yes. I forgot about the HumanAttachment class. It utilizes the new HMTP protocol (Human Mail Transfer Protocol). 

  • Re: HOW TO: Send email using System.Net.Mail

    11-05-2006, 11:22 PM
    Locked
    • Member
      37 point Member
    • hishambon
    • Member since 07-04-2006, 3:59 AM
    • Posts 9
     

    Server Error in '/' Application.

    The specified string is not in the form required for an e-mail address.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.FormatException: The specified string is not in the form required for an e-mail address.

    Source Error:

    Line 14:         ByVal subject As String, ByVal body As String)
    Line 15:         ' Instantiate a new instance of MailMessage
    Line 16:         Dim mMailMessage As New MailMessage()
    Line 17: 
    Line 18:         ' Set the sender address of the mail message

    WHAT IT'S MEAN & WHAT SHOULD I DO?

  • Re: HOW TO: Send email using System.Net.Mail

    11-05-2006, 11:22 PM
    Locked
    • Member
      37 point Member
    • hishambon
    • Member since 07-04-2006, 3:59 AM
    • Posts 9
     

    Server Error in '/' Application.

    The specified string is not in the form required for an e-mail address.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.FormatException: The specified string is not in the form required for an e-mail address.

    Source Error:

    Line 14:         ByVal subject As String, ByVal body As String)
    Line 15:         ' Instantiate a new instance of MailMessage
    Line 16:         Dim mMailMessage As New MailMessage()
    Line 17: 
    Line 18:         ' Set the sender address of the mail message

    WHAT IT'S MEAN & WHAT SHOULD I DO?

  • Re: HOW TO: Send email using System.Net.Mail

    11-05-2006, 11:34 PM
    Locked
    • All-Star
      17,453 point All-Star
    • albertpascual
    • Member since 05-23-2003, 2:11 PM
    • Riverside, CA
    • Posts 3,474
    • TrustedFriends-MVPs

    Are you using 2.0?

    Go to my blog and download the sample

    Cheers
    Al
    My Blog
    MapStats.NET
    Please click on 'Mark as Answer' if this post answered your question!
  • Re: HOW TO: Send email using System.Net.Mail

    11-06-2006, 11:22 PM
    Locked
    • Member
      37 point Member
    • hishambon
    • Member since 07-04-2006, 3:59 AM
    • Posts 9

    Hi,
    I already used the code for my aplication website, the code is great.
    My problem is how can I send a formviev as the body as the email.
    I tried a few ways but i still cannot send the formview,
    Can you help me about it. Curently I cannot make a new post, so that wyh i email you about my problem

    Thanks

  • Re: HOW TO: Send email using System.Net.Mail

    11-07-2006, 12:01 AM
    Locked
    • All-Star
      17,453 point All-Star
    • albertpascual
    • Member since 05-23-2003, 2:11 PM
    • Riverside, CA
    • Posts 3,474
    • TrustedFriends-MVPs
    You can get the html as using Response. but when it comes to your email won't look pretty
    Cheers
    Al
    My Blog
    MapStats.NET
    Please click on 'Mark as Answer' if this post answered your question!
  • Re: HOW TO: Send email using System.Net.Mail

    11-13-2006, 3:41 AM
    Locked
    • Member
      136 point Member
    • DiNASTY
    • Member since 09-28-2006, 1:43 AM
    • Posts 94

    Ryan,

     Can you elaborate a little more on how to set this up... i mean with the prarms string [] as opposed to just the single string address.

     Right now I am having to send in multiple address like this

    public static void SendMailMessage(string from, string address1, string address2, string bcc, string cc, string subject, string body)

    is there an easier way?

Page 8 of 12 (174 items) « First ... < Previous 6 7 8 9 10 Next > ... Last »