need help configuring a script
hi,
i am trying to install a script on an NT server. the script was intended to work with a unix server. everything works fine except for the mail function (obviousily).
this is were i got in trouble
## Path to your sendmail program.
##
$mailserver = "/usr/sbin/sendmail";
i contacted my host, and this is what they sent me:
Quote: Sendmail is only for UNIX systems, we run NT. You can address the SMTP server directly.We support CDONTS JMAIL Sockets method of addressing SMTP server.
You can address these directly eg Const MailMethod="CDONTS Mail"
OR you can address the mail server directly
$SMTP_SERVER="smtp.yourdomain.com";
but i am just a beginner, so i don't know what all these means.
i would be grateful if someone can advice me of what i should do.
thanks
flexible, low-cost, easy to use websites, with easy Site Editor, unlimited pages, and multiple choice of designs and colours. our websites are ideal for small businesses, and personal homepages.
Peter J. Boettcher posted this at 14:11 — 12th February 2002.
They have: 812 posts
Joined: Feb 2000
Did you try replacing your existing line:
$mailserver = "/usr/sbin/sendmail";
with
$SMTP_SERVER = "smtp.yourdomain.com";
I'm not sure if that will work since I've never used CDONTS through Perl, but it's worth a shot.
PJ | Are we there yet?
pjboettcher.com
dragon007 posted this at 14:30 — 12th February 2002.
They have: 67 posts
Joined: Aug 2001
yes i tried, but it didn't work.
thanks Peter J. Boettcher for your post. by the way you have a very nice looking personal website, i like it!
Peter J. Boettcher posted this at 14:37 — 12th February 2002.
They have: 812 posts
Joined: Feb 2000
Thanks Dragon!
I did some more investigating into using Perl and CDONTS and found this example, give it a try:
my $objMail=Win32::OLE->new('CDONTS.NewMail');
$objMail->{From} = '[email protected]';
$objMail->{To} = '[email protected]';
$objMail->{Subject} = 'test';
$objMail->{Body} = 'this is a test';
$objMail->{Importance} = 2;
$objMail->Send();
$objMail = undef;
undef ($objMail);
PJ | Are we there yet?
pjboettcher.com
dragon007 posted this at 14:59 — 12th February 2002.
They have: 67 posts
Joined: Aug 2001
thanks Peter J. Boettcher,
i'll give it a try and hope it's gona work!
dragon007 posted this at 17:00 — 12th February 2002.
They have: 67 posts
Joined: Aug 2001
nope, it didn't work!
doublehelix posted this at 21:04 — 13th February 2002.
They have: 117 posts
Joined: Feb 2002
$mailserver = "/usr/sbin/sendmail";
Your problem is that your hosting company gave you a URL rather than a path to the file on their server. If you look at the above line closely you'll notice they are assigning $mailserver a path, starting at the HD root, to the Unix sendmail program. A URL will not work.
Contact your hosting comapny again and explain to them you need the path to the file on their HD -- not a URL -- to their email program.
dragon007 posted this at 22:02 — 13th February 2002.
They have: 67 posts
Joined: Aug 2001
yes, i thought about it aswell, but when i contacted my host again this is what they replied:
so i have to figure it out my self!
thanks anyway for your post
designready.co.uk
flexible, low-cost, easy to use websites, with easy Site Editor, unlimited pages, and multiple choice of designs and colours. our websites are ideal for small businesses, and personal homepages.
doublehelix posted this at 03:10 — 14th February 2002.
They have: 117 posts
Joined: Feb 2002
What!?!?! That's ridiculous. You're not asking for help in configuring a file, you're asking them where their email program is located. I would be off that server in a heartbeat if that were the type of service they provide.
dragon007 posted this at 09:02 — 14th February 2002.
They have: 67 posts
Joined: Aug 2001
yes i know, but they are offering me free hosting! so i guess i have to deal with it!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.