Gossamer Forum
Quote Reply
Huh, Attachments?
Well, this is weird. I have the following code in a plugin;

Code:
my $send_message = "message here";

require GT::Mail;
GT::Mail->send (
to => $PersonEmail1,
from => $TheirEmail,
subject => "$Subject",
msg => "$send_message",
smtp => $CFG->{db_smtp_server},
sendmail => $CFG->{db_mail_path},
type => 'html'
) or return Links::language ('VAL_CANTEMAIL', $GT::Mail::error);

For some reason, its sending the email, but the message is not being shown...and 2 mangled attachments (*.dat) are attached to the email. Anyone see/know why? Is it a bug in Links SQL, or is there something I'm missing? Unsure

Cheers

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!
Quote Reply
Re: [Andy] Huh, Attachments? In reply to
Hi Andy,

Why are you putting quotes around your variables?

subject => $Subject,
msg => $send_message,

is what I do, and works fine.


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: Dec 10, 2002, 8:51 AM
Quote Reply
Re: [Andy] Huh, Attachments? In reply to
Also,

Try: type => 'text/html'


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] Huh, Attachments? In reply to
OMG..how stupid do I feel now! Of couse its text/html .... I tried looking for the docs on it in the Plugin development stuff, but couldn't seem to find the part about sending HTML emails. I knew it was possible though, cos I did it literally a couple of months ago Tongue

Cheers

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!
Quote Reply
Re: [Andy] Huh, Attachments? In reply to
If you don't know the mime type of something look in GT/MIMETypes.pm from about line 210 onwards.

Last edited by:

Paul: Dec 10, 2002, 9:21 AM
Quote Reply
Re: [Paul] Huh, Attachments? In reply to
The stupid thing was, I did know it...I don't really know why I couldn't remember it though! Maybe I've been working too hard...I've been at it since 7am, and its almost 6:30pm now Unsure

Cheers

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!