Gossamer Forum
Home : General : Perl Programming :

sendmail and CDONTS

Quote Reply
sendmail and CDONTS
My hosting company is confusing me, I can run DBman on their NT server but not the sendmail function.

Below is what they told me, I don't think I can do this in a Perl script. Am I wrong?


Thank you for contacting WinSave Technical Support.
We do support the use of cgi and perl, however, such scripts typically use sendmail as the mail program. As this is a Windows server, sendmail is not supported, you will need to use CDONTs to send the mail.

Here is a sample you can use:

dim objMail

' -- set our email object variable as the required object type --

Set objMail = CreateObject("CDONTS.NewMail")

' -- email variables --
' -- change the to field to the email address you want to send the email to.
' -- change the subject and bodyformat if necessary

objMail.To = user@domain.com
objMail.From = user@domain2.com
objMail.Subject = "Test mail using CDONTS"
objMail.BodyFormat = "0" ' -- HTML format
objMail.Body = "Hi have nice day "

' -- send the email --

' -- clean up object
Set objMail = Nothing

Thanks in advance,
Joe Matthews
Quote Reply
Re: [joematt] sendmail and CDONTS In reply to

That looks like ASP? Unsure

Andy (mod)
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] sendmail and CDONTS In reply to
Yes that's what I thought.

Anyway the DBman script runs and get through the sub that sends the email without returning the error message about "unable to open mail program".

Shouldn't I get an error message if the script can't open the mailprogram using?


open (MAIL, "$mailprog") or &cgierr("unable to open mail program");

Anyway it's not a crisis or an emergency, just confusing me.

Have a nice day.
Quote Reply
Re: [joematt] sendmail and CDONTS In reply to
dont you have NET::SMTP installed if so you can send emails trhu SMTP server instead of use the sendmail or similar.