dwd_Za
07-30-2007, 11:46 AM
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"
aspEmail.Send
---------------------------------------------------------------------
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?
Thanx
Dw
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"
aspEmail.Send
---------------------------------------------------------------------
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?
Thanx
Dw