Hi there,
just wanted to share and kind of write down for myslef the following.
I use another way to send E-Mails and felt it was kind of handy not to get only the mail body but also the subject.
Not sure if this is the best way but I found some place in Links.pm in
...
my $mail = new GT::Mail;
$mail->top_part($top);
+ return {
+ body => $mail->{head}->{data},
+ subject => $mail->{head}->{header_lines}->{subject}[0]
+ } if $opts->{get_body_and_subject};
+
my %send_opts;
if ($CFG->{db_smtp_server}) {
Now you get:
{ %$vars, %ENV },
{ get_body_and_subject => 1 });
Happy to hear any comments
Niko
just wanted to share and kind of write down for myslef the following.
I use another way to send E-Mails and felt it was kind of handy not to get only the mail body but also the subject.
Not sure if this is the best way but I found some place in Links.pm in
Code:
sub send_email { ...
my $mail = new GT::Mail;
$mail->top_part($top);
+ return {
+ body => $mail->{head}->{data},
+ subject => $mail->{head}->{header_lines}->{subject}[0]
+ } if $opts->{get_body_and_subject};
+
my %send_opts;
if ($CFG->{db_smtp_server}) {
Now you get:
Code:
$mail_stuff = Links::send_email('mail_template.eml', { %$vars, %ENV },
{ get_body_and_subject => 1 });
Happy to hear any comments
Niko