Skip to main content
Inspiring
December 11, 2008
Answered

Flash to PHP mail

  • December 11, 2008
  • 6 replies
  • 584 views
I know this isn't strictly a Adobe issue although I am trying to accomplish this with Dreamweaver for my PHP and Flash CS3 for my form source, but maybe someone here can answer this one.
In my PHP code I am using......
$message = "Name: " .$theName;
$message .= "\r\rEmail: ". $theEmail;
$message .= "\r\rPhone: ". $thePhone;
$message .= "\r\rMessage: " . $theMessage;
......to populate the email with these strings from the flash as2 form. They work great when using Entouage or Mac Mail. But when viewed on webmail the line returns disappear.
Initally I had tried \n for returns but they did not work and caused the emails to error out and not be generated. I was told that this was because we were using a goDaddy Windows server and \n needed to be changed to a \r.
So \r works very well except for webmail like Yahoo et al.
Any idea?

This topic has been closed for replies.
Correct answer GumpsterF
Hey kglad.
Found the answer from my genius Nephew in law. Writes entire websites in PHP he tells me.
Inserting, "PHP_EOL" for "\r" works for all formats it seems.
So....
$message .= PHP_EOL . PHP_EOL ."Email: $theEmail";
$message .= PHP_EOL . PHP_EOL ."Phone: $thePhone";
$message .= PHP_EOL . PHP_EOL ."Message: $theMessage";
is the answer it seems.
Gumpster

6 replies

kglad
Community Expert
Community Expert
December 16, 2008
that's a good thing to know.
GumpsterFAuthorCorrect answer
Inspiring
December 16, 2008
Hey kglad.
Found the answer from my genius Nephew in law. Writes entire websites in PHP he tells me.
Inserting, "PHP_EOL" for "\r" works for all formats it seems.
So....
$message .= PHP_EOL . PHP_EOL ."Email: $theEmail";
$message .= PHP_EOL . PHP_EOL ."Phone: $thePhone";
$message .= PHP_EOL . PHP_EOL ."Message: $theMessage";
is the answer it seems.
Gumpster
kglad
Community Expert
Community Expert
December 16, 2008
i would think so. use their support section to see what they say.
kglad
Community Expert
Community Expert
December 16, 2008
start with godaddy sample code that shows how to send a multiline email message.
GumpsterFAuthor
Inspiring
December 16, 2008
I assume that this code exists somewhere on goDaddy's website?
kglad
Community Expert
Community Expert
December 13, 2008
:

$message = "<pre>Name: " .$theName;
$message .= "\r\rEmail: ". $theEmail;
$message .= "\r\rPhone: ". $thePhone;
$message .= "\r\rMessage: " . $theMessage. "</pre>";
GumpsterFAuthor
Inspiring
December 15, 2008
Sorry, but that did not work either kglad.

Just added a M<pre> to either end of the string. so...
<pre>Name: Forrest GumpsterEmail: sperson@someisp.netPhone: 555-5555Message: Testing Monday 1</pre>
I am posting the entire code, perhaps I am missing something critical...



kglad
Community Expert
Community Expert
December 12, 2008
try using a html break tag: <br>

or use <pre> tags to encompass your \r.
GumpsterFAuthor
Inspiring
December 13, 2008
Pardon my ignorance kglad, but I am not very conversant in html yet.
how do you use a <pre> tag to encompass my \r?
I tried inserting the <br> but it either errored out or just added <br> to the string.