I can send an email via Net::SMTP with no problem as long as I use the actual email addresses of those that I wish to send an email.
$smtp = Net::SMTP->new(servername);
$smtp->mail($ENV{REMOTE_HOST});
$smtp->to($email_address);
$smtp->data();
$smtp->datasend("To: " . $what_ever);
$smtp->datasend("From: name\@xxxx.com \n");
$smtp->datasend("Subject: whatever");
$smtp->datasend("\n");
$smtp->datasend($email_msg);
$smtp->dataend();
If I create an email using my MS-Outlook client, I can just type in the user's login names in the To: form, press Ctrl-K, and it somehow looks up those names, called 'Alias', and converts them to real email addresses.
Is there a way to do the same thing in Perl so that I can use the aliases with Net::SMTP instead of the real email addresses?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.