Gossamer Forum
Home : Products : Others : Gossamer Community :

Community::Web::User::send_email() - send HTML?

Quote Reply
Community::Web::User::send_email() - send HTML?
Just a suggestion. I have made the following change to my Community/Web/User.pm , so that the top of send_email() looks like;

Code:
my ($template, $vars, $use_html) = @_;

...and the actually emailing part, I added;

Code:
type => $use_html ? 'text/html' : '',

... so it now looks like;

Code:
# Send the email
my $res = GT::Mail->send(
%head,
msg => $body,
sendmail => $CFG->{email_sendmail},
smtp => $CFG->{email_smtp},
type => $use_html ? 'text/html' : '',
debug => $CFG->{debug} > 1 ? $CFG->{debug} - 1 : 0
);

... and then just add the part in red to normal calls;

Code:
Community::Web::User::send_email('email_msg_notify.eml', $hit, '1');

Maybe add this kinda thing into the next version? Seem a bit of a waste otherwise, as HTML email are always good :)

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!