I'm using classic asp what method is allowed to invoke an email to be sent from a form?
I'm using classic asp what method is allowed to invoke an email to be sent from a form?
You can use the "CreatObject" method in your ASP scripts and use any of the following component:
CDOSys
ASPMAIL
ASPEMAIL
If you are also looking for a script then please email windows[at]eukhost.com and we will give you an example script.
Martin
Chief R & D Officer.
Windows 100% Uptime Hosting - Windows Dedicated Server - Web Hosting Tutorials
I'd give Jmail a try if possible, probably the best one I've ever used. Let me know if you want any code examples.![]()
Josh
Resident Blogger
Hi guys following on from this I have a new problem I need to get round.
I have the follwoing code which works AOK:
'Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
'Mailer.ContentType = "text/html"
'Mailer.FromName = "XXX"
'Mailer.FromAddress= "xx@xx.co.uk"
'Mailer.RemoteHost = "mail.xx.co.uk"
'Mailer.AddRecipient SendRS("Name"), SendRS("EmailAddress")
'Mailer.Subject = "XXX"
'Mailer.BodyText = Mailbody
I have placed this in a loop where Name and EmailAddress are stored in a db however it doesn't like the referance to a recordset as the recipient, it works if I hardcode the recipient details.
On another server I use I can get it to work using CDO no problem:
Set myMail=CreateObject("CDO.Message")
myMail.Subject= "xxxx"
myMail.From="xx@xx.co.uk"
myMail.To= SendRS("EmailAddress")
myMail.HTMLBody = Mailbody
myMail.Send
set myMail=nothing
Any pointers greatfully recieved
I've not seen this problem, but have you tried saving the recordset data in a couple of variables:
txtSendToName = SendRS("Name")
txtSendToAddress = SendRS("EmailAddress")
and then:
Mailer.AddRecipient txtSendToName, txtSendToAddress
Just a suggestion.
Yes sorry should have said I have already tried banging them into a couple of vars
Any other ideas?... anyone
Here's a sample working CDOSYS mail script which you can give a try with:Let us know if you need any further assistance.. Good luck !<%
Set oMail = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
iConf.Fields.Update
Set oMail.Configuration = iConf
oMail.To = "recipient@his-domain.co.uk"
oMail.From = "sender@domain.co.uk"
oMail.Subject = "Test mail.."
oMail.BodyPart.ContentTransferEncoding = "quoted-printable"
oMail.HTMLBody = HTML
oMail.Send
Set iConf = Nothing
Set Flds = Nothing
%>
<html>
Message Sent !!!
</html>
Rock _a.k.a._ Jack
Windows Hosting || Windows Reseller Hosting
Cloud Hosting || Powerful Dedicated Servers
Follow eUKhost on Twitter || Join eUKhost Community on Facebook
For complaints, grievances or suggestions kindly email our FeedBack Dept.
Proper action will be taken accordingly & instantaneously!
There are currently 1 users browsing this thread. (0 members and 1 guests)