Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2007
    Thanked 0 Times in 0 Posts

    ASPMail Contact Form from Secure SMTP Server

    Hi All,

    I hoping someone will be able to help me. My hosts have secure SMTP servers due to some spammers so I have encoded all my contact forms using authenticated smtp. The problem I am having is that I cannot send the email using the details provided by the user, i.e. I cannot use the email address the user is providing. So what I have done is created an email box on the server (for each domain mind you) which I use to send the email from. The problem is though that people generally simply click reply and send, but this will result in email being sent to my email box and the user who submitted the form. below is my code. Any help on how I can get around this will be appreciated:

    Dim aspEMail
    Set aspEMail = Server.CreateObject("Persits.MailSender")

    emailSubject = "Website enquiry"
    emailBodyText = "text"

    aspEmail.Host = "mail.domain.com"
    aspEmail.Username = "webemail@domain.com"
    aspEmail.Password = "webpassword"

    emailFrom = FilterCchar(FTGemail)
    aspEmail.From = "webemail@domain.com"
    aspEmail.FromName = "Website Enquiry"
    aspEMail.AddAddress "info@domain.com"

    aspEmail.Subject = emailSubject
    aspEmail.Body = emailBodyText
    aspEmail.Charset = "ISO-8859-1"
    aspEmail.ContentTransferEncoding = "8bit"



    I would like to have:

    aspEmail.From = "WebsiteVisitorsName@theirdomain.com"
    aspEmail.FromName = "WebsiteVisitorsName

    but this not work as for some reason the server needs to authenicate on the email address being used as FROM?

    Any ideas?


  • #2
    Regular Coder
    Join Date
    Mar 2007
    Thanked 19 Times in 19 Posts
    Your host probably has 2 forms of SMTP authentication -- Connection (as demonstrated by your aspEmail.Host, aspEmail.Username, and aspEmail.Password) and either Sender Authentication or Reverse DNS.

    You may want to try:

    aspEmail.From = "webemail@domain.com"
    aspEmail.FromName = "Website Enquiry"
    aspEMail.AddAddress "info@domain.com"
    aspEMail.AddAddress "WebsiteVisitorsName@theirdomain.com"
    aspEMail.AddReplyTo "WebsiteVisitorsName@theirdomain.com"
    Subject = "Website enquiry"
      if WebsiteVisitorsName <> "" then
        Subject = Subject & " from " & WebsiteVisitorsName
      end if
    aspEmail.Subject = Subject
    Although this doesn't completely solve your problem, it ensures that the personalization of the automatic email is accomplished.

    You will have to ask your Hosting Company for more information about the way they handle outbound SMTP.
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts