#UPDATE: So theres a variable I use in the second email,
it comes from user input, in a form. Somehow its screwing up
sendmail, but im unsure if its caused by just whitespace,
I tried formatting the string using
$string =~ s/\s+$//;
@@ Thing is, I tried this earlier to no avail... but with this webserver my
company is using .. I wouldn't be suprised it wasn't working..
eh.. thanks ALOT Perlbotics @@
EndUpdate
So I have a script sending an email with info,
it then sends a confirmation email.
the first email works fine:
print MAIL <<EOF;
Mime-Version: 1.0
Content-type: text/html; charset="iso-8859-1"
To: info\.someone\@somecompany.com
bcc: $recipient
From: info\@somecompany.com
Subject: BLABLABLA - $SomeVar - $Date
#some text bla bla
EOF
close(MAIL);
the second part is what bugs me, its pretty much the same
print SECONDMAIL <<EOF;
Mime-Version: 1.0
Content-type: text/html; charset="iso-8859-1"
To: info\.someone\@somecompany.com
bcc: $recipient
From: info\@somecompany.com
Subject: BLABLABLA - $SomeVar - $Date
#some text bla bla
EOF
close(SECONDMAIL);
so the problem is this, the first email comes through ok,
the second email comes through, but does not retail the bcc:, from:, or even the subject:!!!, instead, bcc,from, and subject are included in the email as text inside the email, as oppose to information sendmail uses. (it just copies the rest of the text directly as the message)
what could I possibly be doing wrong?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.