Mailer used to work.

Discussion in 'Email' started by rugby, Feb 16, 2011.

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

    We recently changed accounts from one domain to another both on DiscountASP.net and the following email code used to work. All I did was search and replace the old email/domain with the new one. But now I get the following message

    "Your message was not sent

    Please contact the webmaster

    Error :550 5.7.1 Unable to relay for [email protected] "

    I do have a primary admin account setup at DiscountASP.net
    Here's the code that used to work:

    -------------------------------------------------
    ' the following section creates the mail object and sends the mail

    strSubject = "Referee schedule for " & refname & " - " & Ucase(season) & " " & Year(Now) ' change to your subject
    strFrom = "[email protected]" ' change to your email address
    strTo = emailaddress ' change to the recipient's address
    strCc = "[email protected]"
    strBcc = "[email protected]"
    '--------------------------------
    ' Using Persits Email
    '--------------------------------
    strHost = Application("MailHost")
    Set objSendMail = Server.CreateObject("Persits.MailSender")
    objSendMail.Host = strHost
    objSendMail.From = strFrom
    objSendMail.AddAddress strTo
    objSendMail.AddCc strCc
    objSendMail.AddCc "[email protected]"
    objSendMail.AddBCc strBcc
    objSendMail.Subject = strSubject
    objSendMail.Body = strBody
    objSendMail.Priority = 3
    objSendMail.isHTML = true
    objSendMail.Send
    '################################################


    Thanks!
     
  2. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    Please use "localhost" for the SMTP server.
     
  3. Replace Mailhost with localhost?

    So all i need to do is replace mailhost with localhost?
     
  4. I changed the following:

    '-------------------------------
    ' Persists Email
    '-------------------------------
    dim objRefMail
    set objRefMail = Server.CreateObject("Persits.MailSender")
    objRefMail.Host = "localhost"
    objRefMail.From = "[email protected]"
    objRefMail.AddAddress rsReferee("EmailAddress")
    objRefMail.Subject = strSubject
    objRefMail.Body = strBody
    objRefMail.isHTML = false

    But it still says cannot relay.
     
  5. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    550 5.7.1 Unable to relay for [email protected]

    This error usually means it's trying to authenticate. If you're using "localhost" you do not need to supply logon credentials.
     
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