Wrong script in ASP to send emails

Discussion in 'Email Support' started by alfonso, Dec 21, 2005.

  1. alfonso

    alfonso Guppy

    I don't know why this code is wrong:

    strMessage = "Nueva fotograf?a"
    ' Create email object and set all the values, setting the from address to be the person who filled in the form
    Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
    Mailer.FromName = "Alfonso"
    Mailer.FromAddress= "alfonso@gesdinet.com"
    Mailer.RemoteHost = "localhost"
    Mailer.AddRecipient "Proud To Have Met You", "webmaster@gesdinet.com"
    Mailer.Subject = "Proud To Have Met You - Contact Form"
    Mailer.ContentType = "text/html"
    Mailer.BodyText = strMessage


    I write this but no message is sent.

    Can anybody help me? Thanks
  2. Penhall

    Penhall Perch

    Your remotehost field is wrong: should be mail.yourdomain.ext
  3. alfonso

    alfonso Guppy

    Thanks. It`s OK now.
  4. serverzb

    serverzb Perch

    Hello

    mayI know this script is using CDO component using asp.net?

    thanks
  5. snooper

    snooper Perch

    also - because of authnetication issues - the script may still not work in all situations, and you'll have to move to CDOSYS, or CDONTS

Share This Page

JodoHost - 26,000 hosting end-users in 100 countries
Plesk Web Hosting
VPS Hosting
H-Sphere Web Hosting
Other Services