Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #9048 > unrolled thread
| Started by | BobMCT <r.mariotti@fdcx.net> |
|---|---|
| First post | 2013-04-13 16:57 -0400 |
| Last post | 2013-04-13 20:22 -0400 |
| Articles | 5 — 4 participants |
Back to article view | Back to comp.lang.php
Suggestions on formatting an outgoing email message BobMCT <r.mariotti@fdcx.net> - 2013-04-13 16:57 -0400
Re: Suggestions on formatting an outgoing email message Christoph Becker <cmbecker69@gmx.de> - 2013-04-13 23:17 +0200
Re: Suggestions on formatting an outgoing email message BobMCT <r.mariotti@fdcx.net> - 2013-04-13 19:50 -0400
Re: Suggestions on formatting an outgoing email message Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-04-14 12:13 +0200
Re: Suggestions on formatting an outgoing email message Jerry Stuckle <jstucklex@attglobal.net> - 2013-04-13 20:22 -0400
| From | BobMCT <r.mariotti@fdcx.net> |
|---|---|
| Date | 2013-04-13 16:57 -0400 |
| Subject | Suggestions on formatting an outgoing email message |
| Message-ID | <jsgjm85ultv8979ohhb4rtbo63lagjk81c@4ax.com> |
In a very small php program that runs at the end of a daily
production job I generate an informational email message send to the
system administrator. No matter which of the two methods used below
to generate the message the results are received unformatted.
// generate email message method 1
$Mailmsg = "[abc.sh] Daily Results Retrieval Job\n\n";
$Mailmsg .= "One or more error(s) occured during the last\n";
$Mailmsg .= "execution of the above referenced script.\n\n";
$Mailmsg .= "$Errs\n";
$Mailmsg .= "Please review/research file daily.log\n";
$Mailmsg .= "for more details.\n";
// generate email message method 2
$Mailmsg = <<<EOD
[abc.sh] Daily Results Retrieval Job
One or more error(s) occured during the last
execution of the above referenced script.
$Errs
Please review/research file daily.log
for more details.
EOD;
Either one results in the received message being format as:
[abc.sh] Daily Results Retrieval Job One or more error(s) occured
during the last execution of the above referenced script. {content of
the $Errs file} Please review/research file daily.log for more
details.
I'm using PHPMailer to generate/send this message. I do, however, use
both these techniques in other programs with the same function and the
messages are formatted corrected.
Any suggestions/ideas?
Thanks
[toc] | [next] | [standalone]
| From | Christoph Becker <cmbecker69@gmx.de> |
|---|---|
| Date | 2013-04-13 23:17 +0200 |
| Message-ID | <kkchv0$iph$1@speranza.aioe.org> |
| In reply to | #9048 |
BobMCT wrote: > Any suggestions/ideas? Line breaks in emails have to be "\r\n"; see RFC 5322. -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | BobMCT <r.mariotti@fdcx.net> |
|---|---|
| Date | 2013-04-13 19:50 -0400 |
| Message-ID | <gmrjm8t8shnt7mv0var4agp88t5f2qrrrp@4ax.com> |
| In reply to | #9049 |
On Sat, 13 Apr 2013 23:17:30 +0200, Christoph Becker <cmbecker69@gmx.de> wrote: >Becker Thanks for the very quick reply. However, tried it and it didn't make any difference. I will also look into the referenced rfc.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2013-04-14 12:13 +0200 |
| Message-ID | <2179176.OIJDmKvmO4@PointedEars.de> |
| In reply to | #9049 |
Christoph Becker wrote: > BobMCT wrote: >> Any suggestions/ideas? > > Line breaks in emails have to be "\r\n"; see RFC 5322. The OP uses PHPMailer which should take care of that. PointedEars -- Danny Goodman's books are out of date and teach practices that are positively harmful for cross-browser scripting. -- Richard Cornford, cljs, <cife6q$253$1$8300dec7@news.demon.co.uk> (2004)
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2013-04-13 20:22 -0400 |
| Message-ID | <kkcsmt$ak$1@dont-email.me> |
| In reply to | #9048 |
On 4/13/2013 4:57 PM, BobMCT wrote:
> In a very small php program that runs at the end of a daily
> production job I generate an informational email message send to the
> system administrator. No matter which of the two methods used below
> to generate the message the results are received unformatted.
>
> // generate email message method 1
>
> $Mailmsg = "[abc.sh] Daily Results Retrieval Job\n\n";
> $Mailmsg .= "One or more error(s) occured during the last\n";
> $Mailmsg .= "execution of the above referenced script.\n\n";
> $Mailmsg .= "$Errs\n";
> $Mailmsg .= "Please review/research file daily.log\n";
> $Mailmsg .= "for more details.\n";
>
> // generate email message method 2
>
> $Mailmsg = <<<EOD
> [abc.sh] Daily Results Retrieval Job
>
> One or more error(s) occured during the last
> execution of the above referenced script.
>
> $Errs
> Please review/research file daily.log
> for more details.
> EOD;
>
>
> Either one results in the received message being format as:
>
> [abc.sh] Daily Results Retrieval Job One or more error(s) occured
> during the last execution of the above referenced script. {content of
> the $Errs file} Please review/research file daily.log for more
> details.
>
>
> I'm using PHPMailer to generate/send this message. I do, however, use
> both these techniques in other programs with the same function and the
> messages are formatted corrected.
>
> Any suggestions/ideas?
>
> Thanks
>
Are you sending the message as plain text or html? What does the
message source look like?
What's the rest of your code look like? Break it down to the minimum
necessary for us to recreate your problem.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web