Click here to get back home

Problem creating envelope-from in module Email::Send

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Problem creating envelope-from in module Email::Send Ralph 07-16-2007
Posted by Ralph on July 16, 2007, 7:33 am
Please log in for more thread options



Hi,

I am trying to use the nice Email::Send (and friends) module and have
a problem creating the 'envelope from' as documented at
http://search.cpan.org/dist/Email-Send/lib/Email/Send/SMTP.pm#ENVELOPE_GENERATION

<citation start>
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.
<citation end>

What does this mean? I tried to use 'get_env_recipients' as a
constructor parameter (e.g. "my $mailer = Email::Send->new({mailer =>
'SMTP', get_env_sender => \&my_get_env_sender});") and MANY more
things, but obviously this is wrong....

Can anyone point me in the right direction before I become crazy?

Ralph


Posted by Peter J. Holzer on July 16, 2007, 9:51 am
Please log in for more thread options


> I am trying to use the nice Email::Send (and friends) module and have
> a problem creating the 'envelope from' as documented at
>
http://search.cpan.org/dist/Email-Send/lib/Email/Send/SMTP.pm#ENVELOPE_GENERATION
>
><citation start>
> 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.
><citation end>
>
> What does this mean?

It probably means you have to define a subclass of Email::Send::SMTP which
overrides these methods.

> I tried to use 'get_env_recipients' as a
> constructor parameter (e.g. "my $mailer = Email::Send->new({mailer =>
> 'SMTP', get_env_sender => \&my_get_env_sender});") and MANY more
> things, but obviously this is wrong....

I see no indication in the documentation of Email::Send or
Email::Send::SMTP that it recognizes a property with the name
get_env_sender.

        hp

--
_ | Peter J. Holzer | I know I'd be respectful of a pirate
|_|_) | Sysadmin WSR | with an emu on his shoulder.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ |        -- Sam in "Freefall"

Posted by Gunnar Hjalmarsson on July 16, 2007, 5:18 pm
Please log in for more thread options


Peter J. Holzer wrote:
>> I am trying to use the nice Email::Send (and friends) module and have
>> a problem creating the 'envelope from' as documented at
>>
http://search.cpan.org/dist/Email-Send/lib/Email/Send/SMTP.pm#ENVELOPE_GENERATION
>>
>> <citation start>
>> 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.
>> <citation end>
>>
>> What does this mean?
>
> It probably means you have to define a subclass of Email::Send::SMTP which
> overrides these methods.

Do you mean that it would be doable without a need to edit the
Email/Send/SMTP.pm file? If so, could you please give us a hint how to
do it?

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

Posted by Ari Jolma on July 17, 2007, 8:10 am
Please log in for more thread options


I've released a versions 0.01 of Geo::OGC::Geometry and 0.54 of
Gtk2::Ex::Geo.

Geo::OGC::Geometry contains several classes in the Geo::OGC namespace.
The idea of the module is to implement the OGC (www.opengeospatial.org)
simple feature geometry model, which is a standard in the geospatial
software domain. This initial release is usable mainly for storing
geospatial data since most of the methods for testing spatial relations
and the methods that support spatial analysis are not yet implemented.
The very basic computational geometry algorithms are however implemented
and the standard methods could be implemented using those.

The Gtk2::Ex::Geo contains basic classes for developing graphical
geospatial applications. It depends on Gtk2 and Cairo and implements a
GeoCanvas and a class whose objects can be used to manage a stack of
geospatial data that are rendered on the canvas. The Gtk2::Ex::Geo
version 0.54 is the first one that is almost pure Perl (there is minimal
xs code, mostly to manage a Cairo surface and GDK pixbuf). There is a
root Layer class in the distribution that contains, e.g., a color system
dialog box, but it is meant to be an abstract class.

There are subclasses for Gtk2::Ex::Geo::Layer that build on Geo::GDAL,
which is a swig/Perl interface to the C++ GDAL library. The new versions
of these will be uploaded to CPAN in near future. The development
versions are available at http://map.hut.fi/files/Geoinformatica/

Both of these modules are a part of geospatial software stack called
Geoinformatica, whose home page is at
http://geoinformatics.tkk.fi/twiki/bin/view/Main/GeoinformaticaSoftware

These modules should be discussed on the geo-perl list:
https://list.hut.fi/mailman/listinfo/geo-perl

Best regards,

Ari Jolma

Similar ThreadsPosted
Problem installing module Email-Send December 4, 2007, 8:39 pm
Problem Installing Module (Email::MIME::Modifier) July 31, 2007, 11:41 pm
Is there a module to help me to send/receive msg and file with MSN message? May 12, 2005, 2:03 am
Perl module to send mail with Attachments April 25, 2007, 2:03 pm
creating perl binary using PAR module , execution error under unix March 15, 2008, 7:06 am
Looking for module that will expands domain/username to email address October 23, 2004, 12:56 am
Net::SCP - bug found, where to send? October 7, 2004, 12:09 pm
Send::Mail nothing happens and no errors January 25, 2007, 10:09 am
How do you send a custom request with LWP::UserAgent? July 31, 2005, 6:09 am
Creating Calendar?? October 6, 2004, 12:37 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap