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?

Quote:

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 --
objMail.Send

' -- clean up object
Set objMail = Nothing
%>

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

That looks like ASP? Unsure

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
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?

Code:

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.

:D