• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

php send email help/idea needed

Hi

is it possible to send contents in a div as a email? anyone got a example of how to?


Thanks
0
3xtr3m3d
Asked:
3xtr3m3d
  • 2
2 Solutions
 
Loganathan NatarajanLAMP DeveloperCommented:
yes, you can send div based content using this standard phpmailer library.

ref. PHP lib
0
 
Ray PaseurCommented:
The contents of email messages are strings of characters.  That means that you can send anything that is of the data type "string" including plain text, base64-encoded images, HTML and CSS, etc.  So if you have the contents of the div in a PHP string variable, you can send it in email.  You might want to check the mime type, and you might want to consider sending an alternate format, just in case your clients are not taking HTML email.

If you have a serious application (one where your money and your time matter) you might want to consider using ConstantContact.com instead of sending your own emails.  If you send your own, you will spend a lot of non-value-added time debugging the email system.  If you use ConstantContact, you will save all of that time and effort and you can focus on the part of the application that adds value for your company and your clients.  Just a thought from someone who has been sending automated email since 1999 and who gave up and turned to ConstantContact in 2008.  I am never going back!

best regards, ~Ray
0
 
3xtr3m3dAuthor Commented:
Hi

Thanks for the information guys, its really helpful. im gona use phpmailer though.

so i can get div content using jquery and send to script using ajax. but still no idea how to add css stuff to it
0
 
Loganathan NatarajanLAMP DeveloperCommented:
Yes, you can include css on your mails using PHP Mailer, just check out this, Example with CSS
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now