Gossamer Forum
Home : General : Perl Programming :

make script send from email as webmaster@site.com instead of site@localhost

Quote Reply
make script send from email as webmaster@site.com instead of site@localhost
Hi,

I am using a modified version of birdcast.cgi found at bignosebird.com - the modification that I made is instead of using it as a recommendation script, I use it as a formmail script wherein a visitor to our site can fill in the form and the information is forwarded to another person.

This works great except for AOL user accounts. The problem is that it seems AOL emails received should come from a specific email address (it seems that when this script sends emails it sends them as coming from sitename@localhost but it needs to be something like webmaster@sitename.com). I was told by my webhost that I need to make sure the script sends the email as it is coming from webmaster@sitename.com instead of localhost.

So, the question is - if it is possible to make the script do this or is this a setting that is related to sendmail or SMTP but not the script as my host says it is. I currently use sendmail (but I will test soon with SMTP if it is still a problem with AOL).

If it is something in the script, then what changes do I need to make?

Thanks,
Mike
Quote Reply
Re: [socrates] make script send from email as webmaster@site.com instead of site@localhost In reply to
Seeing your modified script would be helpful. But based on original script, is the $fromaddr variable defined in the sendmail SUB? If not, then define in the SUB as:

$fromaddr = 'webmaster@sitename.com ';

...BTW, are all generated emails supposed to originate from webmaster@sitename.com?

----
Cheers,

Dan
Founder and CEO

LionsGate Creative
GoodPassRobot
Magelln