| | |
mail() custom format?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Anyone know how to get a custom layout when sending email's via mail()?
At the moment I would just like to start a new line in an email but eventually throw in images and etc.
Any information be much appericated.
Regards, X
At the moment I would just like to start a new line in an email but eventually throw in images and etc.
Any information be much appericated.
Regards, X
"You never stop learning." - OmniX
means , you want to write some thing in that mail...Right????
if so,
see this..
if so,
see this..
php Syntax (Toggle Plain Text)
$mail_body='<style type=text/css><!--td {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}--></style> <table width="50%" border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#E7E7E7"> <tr><td>[B]Do your design here...[/B]</td></tr> </table>'; mailto = 'some@some.com' ; $mailheader = 'MIME-Version: 1.0' . "\r\n"; $mailheader .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $mailheader.=" From: someone\r\n"; $mailheader .= 'BCc:some2@some.com' . "\r\n"; @mail($mailto,' Details',$mail_body,$mailheader);
Last edited by Shanti Chepuru; Oct 17th, 2008 at 3:58 am.
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Ya using the mail function() http://www.php.net/mail.
Last edited by OmniX; Oct 17th, 2008 at 3:58 am.
"You never stop learning." - OmniX
Hi shanti!
I have retired for the day and obligated over the weekend but I will try get it next week. Just for some confirmations:
These lines allow you to maniuplate the email into html? if not what purpose they serve?
[code=html]
$mail_body='<style type=text/css><!--td {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}--></style>
<table width="50%" border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#E7E7E7">
<tr><td>Do your design here...</td></tr>
</table>';
[code]
I put similar tags in my email and they just came out as normal <tr>, etc but I guess your decleration in the header will allow this to be formatted as html than rather text? This correct?
Thanks, Regards X
I have retired for the day and obligated over the weekend but I will try get it next week. Just for some confirmations:
php Syntax (Toggle Plain Text)
$mailheader = 'MIME-Version: 1.0' . "\r\n"; $mailheader .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
[code=html]
$mail_body='<style type=text/css><!--td {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}--></style>
<table width="50%" border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#E7E7E7">
<tr><td>Do your design here...</td></tr>
</table>';
[code]
I put similar tags in my email and they just came out as normal <tr>, etc but I guess your decleration in the header will allow this to be formatted as html than rather text? This correct?
Thanks, Regards X
"You never stop learning." - OmniX
yes,
To send HTML mail, the Content-type header must be set..
right....
For more details see this
To send HTML mail, the Content-type header must be set..
•
•
•
•
I guess your decleration in the header will allow this to be formatted as html than rather text? This correct?
For more details see this
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Thanks Shanti, works like a gem.
Now I just need something creative.
You have any idea on how to send images along with the email?
would be a simply img refer to an image on the server?
Also any other fancy ideas you have will be much appericated.
Thanks, Regards X
Now I just need something creative.
You have any idea on how to send images along with the email?
would be a simply img refer to an image on the server?
Also any other fancy ideas you have will be much appericated.
Thanks, Regards X
Last edited by OmniX; Nov 4th, 2008 at 10:17 pm.
"You never stop learning." - OmniX
As I get them I will.
My basic aim is to re-create a webpage in an email, with all images, etc.
How did you post the image?
I tried the <img src="server"> and it didnt work came up as an X (not loaded).
If I get any cool ideas ill let you know but objective is to basically recreate a small webpage in the email (that would be cool).
Thanks, Regards X
My basic aim is to re-create a webpage in an email, with all images, etc.
How did you post the image?
I tried the <img src="server"> and it didnt work came up as an X (not loaded).
If I get any cool ideas ill let you know but objective is to basically recreate a small webpage in the email (that would be cool).
Thanks, Regards X
"You never stop learning." - OmniX
![]() |
Similar Threads
- Custom page to login to Yahoo, Gmail, MSN etc (JavaScript / DHTML / AJAX)
- my dads computer is filled with spam a little help please (Viruses, Spyware and other Nasties)
- How to install slackware (Not as easy as MEPIS) (Getting Started and Choosing a Distro)
- javascript works in IE but not working in firefox (JavaScript / DHTML / AJAX)
- modify script (Perl)
- Unmetered Web space for Reseller Web Hosting from WebHostingWith.us (Web Hosting Deals)
- Mns and Adware.. Please Help (Viruses, Spyware and other Nasties)
- Bridge.dll missing (Viruses, Spyware and other Nasties)
- Tutorials for Linux (*nix Software)
Other Threads in the PHP Forum
- Previous Thread: Name and Password login
- Next Thread: micro chat problem
Views: 1538 | Replies: 10
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class clean cms code countingeverycharactersfromastring cron curl database date directory display download dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail match menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions simple sms soap source space spam speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube






