Your question isn't too clear, but I'm going to take it that you want additional email headers, such as X-Mailer: or X-Referring-IP: headers.
Thunders has already given good pointers to the modules that you should look into if you decide to write this sort of thing yourself.
There are many scripts out there that can do this, although I would suggest you try and understand what the script is doing - some of the scripts out there are far from perfect.
The already mentioned nms should be considered one of the best.
If you're looking for a full-on webmail system, then look at acmemail or Neomail.
Here's a quick example of how to send an email with extra email headers I've russled up - it's pretty much what's in the documentation with some extra headers added. Note:
#!/usr/bin/perl -w use strict; use Net::SMTP; my $smtp = Net::SMTP->new('mailhost.foo.com'); $smtp->data(); $smtp->datasend("To: user@bar.com\n"); $smtp->datasend("X-Mailer: Random dodgy email script\n"); $smtp->datasend("X-My-Favourite-Whisky: Glenfarclas\n"); # The following newline is the delimiter between the header # and the body. # For more info, on headers and how to form a email # you should read the RFC for SMTP. $smtp->datasend("\n"); # Following line is the message body. $smtp->datasend("If this works, you've got Perl to thank.\n"); $smtp->dataend(); $smtp->quit;
Update: Added a comment to the example code to clearly show the header and body sections of the transaction.
In reply to Re: extended email headers
by BazB
in thread Xtended Headers
by Gremlin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |