Double Quotes within $mail->Body ="";
Posted 23 February 2006 - 10:48 PM
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]$mail->Body = "";[/quote]
Is there any way to put PHP code and double quotes inside this statement to send out a dynamic-type HTML e-mail message? I've tried escaping double-quotes and all that, but it never seems to work.
Posted 23 February 2006 - 11:33 PM
the mail function allows you to include all the quotes and variables you want...just escape the quotes, and remember the difference between double and single quotes with regard to variable substitution.
$body = "this is a quote: \"some text\" \n\nfollowed by a var: $var"; mail('firstname.lastname@example.org', 'An email for you',$body);
[a href=\"http://us2.php.net/manual/en/function.mail.php\" target=\"_blank\"]http://us2.php.net/manual/en/function.mail.php[/a]
Posted 25 February 2006 - 05:47 AM
Posted 25 February 2006 - 06:24 AM
There is a email list devoted to phpmail. You can sign up at [a href=\"http://lists.sourceforge.net/lists/listinfo/phpmailer-general\" target=\"_blank\"]http://lists.sourceforge.net/lists/listinf...pmailer-general[/a]
In answer to your original question.... If you manage to put PHP code into an email message, where is the server that is going to process that code? There is no way that PHP code will execute in the confines of an email message. It might be better to create a special web site and email the URL.
Also, since you never showed us what you attempted, there was no way that anyone could even try to help.
If you need help, post the code that is giving you problems and what you attempted.
Posted 27 February 2006 - 03:12 AM
In a nutshell, say I have some PHP code. I want to process that PHP code into HTML first, and then send the HTML through an e-mail message. Right now I can't make that happen with PHPmailer without getting a parse error, even if I escape all of the double-quotes and stuff. I may just be missing something.
By the way, as a separate argument, mailing lists are a nuisance. Basically you are force-fed all of this mail that you may not be able to help with, but you get it in your Inbox anyway. At least with a message board, you can pick and choose what you want to reply to, without having to sort or delete anything. Mailing lists are archaic.
Posted 27 February 2006 - 04:00 AM
But if there is a mailing list available to you that can help with your problem, then you use that tool.
I am subscribed to many mailing lists, they all are filtered into their own mailboxes. I don't read most of the messages when then come in, but if I have a problem, I will search the saved messages for a solution. I can scan the subject lines in saved messages just as well as I can scan them in a forum. Plus I can read and search the mailboxes even when I'm offline.
I think mailing lists still have their place in the online world, just USEnet newsgroups have a place. The predate many mailing lists.
Posted 01 March 2006 - 03:05 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users