Announcement

Collapse
No announcement yet.

Sending Email

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • eUK - Chris
    replied
    Originally posted by EnjayW View Post
    Issue sorted now, thanks Chris...

    I guess f32/send-email-asp-net-2302/ need updatin as thats where i was getting my information from.

    What was wrong, i was using smtp.mydomain.com instead of mail.mydomain.com and wasn't setting the port.
    Hi Nigel,

    No worries, I'm glad to hear that the issue has been sorted.

    Leave a comment:


  • EnjayW
    replied
    Issue sorted now, thanks Chris...

    I guess f32/send-email-asp-net-2302/ need updatin as thats where i was getting my information from.

    What was wrong, i was using smtp.mydomain.com instead of mail.mydomain.com and wasn't setting the port.

    Leave a comment:


  • eUK - Chris
    replied
    Hi Nigel,

    On our shared servers we have authentication set for sending emails through script.

    It seems you are using smtp.mydomain.com, can you try using server name as the servers IP or mail.domain.tld ?

    If you are trying to send emails from scripts , then you need to check the following points in your script :

    1) SMTP HOST = mail.domain.tld or (mail server ip)

    2) From Field email address = the one that is created from your control panel, and present there

    3) Password = its respective password

    4) Port = 25

    This is to be verified as we have authentication set for the emails.

    If the error persist even after using mail.domain.tld, I will suggest you to raise a support ticket or initiate a live chat with windows department
    or else PM me the details of the domain and script location, we investigate this for you.

    Leave a comment:


  • EnjayW
    started a topic Sending Email

    Sending Email

    I'm trying to send an email from asp.net 4.0 and all i get is an error saying :- ERROR Failure sending mail. I am using the below code, some of which taken from another thread.

    Dim msg As MailMessage = New MailMessage()
    Dim smtp As New SmtpClient("smtp.mydomain.com")

    msg.From = New MailAddress(strFromAddress, strFromUser)
    msg.To.Add(New MailAddress(strEmailAddress, strRecipient))
    msg.IsBodyHtml = False
    msg.Subject = ""
    msg.Body = ""

    Dim credLogin As System.Net.NetworkCredential = New System.Net.NetworkCredential("[email protected]", "mypassword")

    smtp.Credentials = credLogin
    smtp.Send(msg)

    Does anyone know what I am doing wrong and what the error is. I've set up the from email address.
Working...
X