It is possible, but it may not have all of the advantages you think. The module you would want to look at if you wanted to do this is Net::SMTP (and you'll also want Net::DNS::Resolver to get the Mail Exchanger for the recipient), but it is not as simple as just firing off one function call to send the mail and being done. In effect, your Perl script has to _become_ the sending mail server, which means it ought to handle things like retrying later in the case of a temporary outage at the recipient's end. By the time you handle everything you need to handle, you may not be saving the overhead that you wanted to save. You also need to authenticate the user, but you need to do that even if you're using a local MTA to send. And make darn sure you log the user's IP address for each message-id, or put the user's IP in the headers, or both.
In reply to Re: How do I send an email using the user's sendmail program than my sendmail?
by jonadab
in thread How do I send an email using the user's sendmail program than my sendmail?
by PerlBeginner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |