smiffy has asked for the wisdom of the Perl Monks concerning the following question:
I want so set a specific value for envelope sender with Email::Send::SMTP. The idea behind this being that I can have a noreply@ address as the 'From', but be able to specify an attended mailbox for any bounces. Quoth the manpage:
The envelope sender and recipients are, by default, generated by looking at the From, To, Cc, and Bcc headers. This behavior can be modified by replacing the "get_env_sender" and "get_env_recipients" methods, both of which receive the Email::Simple object and their only parameter, and return email addresses.
I have read this several times and have looked at the manpage for Email::Simple but still can't figure out what I'm supposed to do other than that I have to put:
sub get_env_sender { # something }
...somewhere. But where? And what am I supposed to put in it?
Sorry, having a Bad Documentation Comprehension Day here so any pointers would be appreciated!
Once I have this figured out, I think I might contact the module author and suggest that an example be added to the documentation.
Many thanks to Anonymous Monk #1 and Anonymous Monk #2 for their responses. I have never written modules before that are based on other modules (that is, extending them) so had not come across the subclass technique. So, yesterday was one of my most valuable learning days of the year! I will now go forth and implement this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Email::Send::SMTP - setting envelope sender
by Anonymous Monk on Dec 20, 2008 at 07:48 UTC | |
by Anonymous Monk on Dec 20, 2008 at 07:49 UTC |