Sending email via "MailMessage"

Discussion in 'ASP.NET / ASP.NET Core' started by ashrafcsnet, Oct 23, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I was sending emails using "MailMessage" but suddenly an error always occured when the code access this class... I need to know if we ca use alternative of this class to send email or not... Thank you




    Dim MMobj As New MailMessage


    MMobj.To = txtMail.Text
    MMobj.From = [email protected]
    MMobj.Subject = "AshrafCS.NET Guest Book Submition... "
    MMobj.BodyFormat = MailFormat.Html
    MMobj.Bcc = [email protected]
    MMobj.Body =""


    SmtpMail.SmtpServer = "mail.ashrafcs.net"


    SmtpMail.Send(MMobj)





    * Note: I'm using my mail via outlook using the SMTP above "mail.ashrafcs.net" and its working.





    I need help... thank you
     
  2. Try doing:

    SmtpMail.SmtpServer = 'localhost'

    I don't think DASP let's you use non-localhost SMTP servers to help reduce spam.
     
  3. Yeah, as far as I know you need to use "localhost" for the server name. At least that's what I use and never have a problem with it.

    Michael
    http://www.imageofself.com
     
  4. [​IMG]How come I m having all these errors when I do the same thing?

    SmtpMail.SmtpServer = "localhost"


    No actual email was sent to destination email address. I wonder what happened on the server?

    Or should I use the SMTP Server given by DASP.Net?
     
  5. Bruce

    Bruce DiscountASP.NET Staff

  6.  
  7. Help!!!

    My code seems to work, except I can only send to accounts that are on discountasp. All other get a mail failure..




    Dim smtpmail As New Mail.MailMessage
    smtpmail.From = [email protected]
    smtpmail.To = [email protected]
    smtpmail.Cc = [email protected]
    smtpmail.Subject = "New Apparel Orders"
    smtpmail.BodyFormat = MailFormat.Html
    smtpmail.Body = HTMLMessageBody.Text
    Mail.SmtpMail.SmtpServer = "localhost"
    Mail.SmtpMail.Send(smtpmail)


    Any advice would be be helpfull


    Thanks,


    Al

    Al
     
  8. Bruce

    Bruce DiscountASP.NET Staff

  9. Reporting-MTA: dns;web107.discountasp.net
    Received-From-MTA: dns;web107
    Arrival-Date: Tue, 6 Dec 2005 13:57:43 -0800
    Final-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.5.0
    Diagnostic-Code: smtp;550-64.79.161.47 blocked by ldap:eek:u=rblmx,dc=comcast,dc=net
    550 Blocked for abuse. Please send blacklist removal requests to [email protected] - Be sure to include your mail server IP ADDRESS.


    Al
     
  10. Forgot to state, I can send from my regular mail account at mail.traceysbaskets.com using outlook or WebMail

    Thank,
    Al

    Al
     
  11. Bruce

    Bruce DiscountASP.NET Staff

    very strange!! i didn't know our mail server is being blocked.

    please create a support ticket.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  12. For some reason it's working today... Very Strange... Also, can I put a diferent From address? No, I'm not trying to spam [​IMG]

    Al
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page