Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cgi sendmail with yahoo and aol accounts

Status
Not open for further replies.

tswitz00

IS-IT--Management
Jan 26, 2005
67
US
I have a cgi script that auto responses after an appointment has been made. The sendmail seems to work fine with all other accounts but it wont make it to yahoo or aol accounts. here is the code:
open ( MAIL, "| /usr/lib/sendmail -t -i ") || die "Unable to open sendmail";
print MAIL "MIME-Version: 1.0\r\n";
print MAIL "Content-type: text/html; charset=iso-8859-1\r\n";
print MAIL "From: us\@domain.com\n";
print MAIL "Reply-To: us\@domain.com\n";
print MAIL "To: them\@domain.com\n";
print MAIL "Cc: us2\@domain.com\n";
print MAIL "Bcc: us3\@domain.com\n";
print MAIL "Return-Path: us\@domain.com\n";
print MAIL "Subject: Appointment Update\n\n";
print MAIL "Name: $showname<br>";
print MAIL "Sponsoring Attorney: $username<br>";
print MAIL "Phone number: $cphone<br>";
print MAIL "Notes: $cnotes<br>";
print MAIL "Appointment Date: $cbooked<br>";
print MAIL "Result: No Show<br>";
close ( MAIL );

I had some of the same problems with a php script and I read that you should add the reply and return path so I tried that with this script too and still does not work. Any suggestions? Thanks
 
If you're sending mail from a server on domain.com through a mail server on domain.com, there shouldn't be an issue. I couldn't imagine yahoo and aol blocking ALL relayed messages.

Can you authenticate on the mail server somehow? Maybe it appends something to the message saying it trusts you.

Is your mail server blacklisted?

Also, as an aside, as it likely has nothing to do with your problem, have you looked at the modules available for sending mail? Net::SMTP or Mail::SendMail? They have nice API's to work with.

________________________________________
Andrew

I work for a gift card company!
 
Andrew, thanks for the quik response.

Well I know our mailserver is not blacklisted becuase I can send an email out to a test yahoo account from a regular email client and not from the script and the message makes it there no problem.

I am not exactly sure about the authentication on the mail server or how I would go about doing that.

 
Use Net::SMTP, your probably missing some headers AOL and Yahoo require. Why hand assemble SMTP protocol when there are perfectly nice modules to handle that for you?
 
Thanks for the reply. I actually already changed it to Net::SMTP and it works perfectly now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top