Home : General : Perl Programming :

General: Perl Programming: Re: [delicia] Sending file by email blues :(: Edit Log

Here is the list of edits for this post
Re: [delicia] Sending file by email blues :(
Hi,

If you didn't specify SMTP stuff, it would have just been sending via Sendmail.

To just use plain text emails - change:

Code:
# multipart message
my @message_parts = (
Email::MIME->create(
body_str => $text,
attributes => {
encoding => 'quoted-printable',
content_type => "text/plain",
disposition => "inline",
charset => "UTF-8",
}
),
Email::MIME->create(
body_str => $html,
attributes => {
encoding => 'quoted-printable',
charset => "UTF-8",
content_type => "text/html",
disposition => "inline",
}
)
);


my @all_parts;
push @all_parts, Email::MIME->create(
parts => \@message_parts, # add all the message parts into here...
attributes => {
content_type => "multipart/alternative"
}
);

To:

Code:
# multipart message
my @message_parts = (

Email::MIME->create(
body_str => $text,
attributes => {
encoding => 'quoted-printable',
content_type => "text/plain",
disposition => "inline",
charset => "UTF-8",
}
)
);

my @all_parts;
push @all_parts, Email::MIME->create(
Email::MIME->create(
parts => \@message_parts, # add all the message parts into here...
attributes => {
encoding => 'quoted-printable',
content_type => "text/plain",
disposition => "inline",
charset => "UTF-8",
}
),
);

If the emails are getting through ok though, you may not even need to use SMTP (its only really if you are worried about DKIM/SDF/DPAC rules blocking your emails coming through, if you have them set up to filter traffic not coming from your SMTP server's IP)

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!

Last edited by:

Andy: Mar 20, 2020, 5:18 AM

Edit Log: