Sending mail from a CGI

Im trying to send an email out in a perl cgi, the code seems to work fine on my local system, but on dreamhost it does not work.
Im trying to use sendmail(/usr/sbin/sendmail) but it does not seem to be working. I have tried directly calling sendmail from the command line and sending myself an email(on another dreamhost account), but the email never appears. I sendmail not usable? Should i send mail out using SMTP instead?

On Dreamhost, the path to sendmail is /usr/sbin/sendmail.

–rlparker

Woops, that was a mistake in my original post. I was using /usr/sbin/sendmail

Ok, I figured it out, the message that my script was passing to sendmail started with a newline, once that was removed it works.

Ah! Yep, that would do it! Thanks for taking the time to post back and share what the problem turned out to be. That’s useful to others faced with a similar problem! :slight_smile:

I’m glad you got it working!

–rlparker