Hi,

I have written a script that sends daily emails.
I want a certain part of the mail text to be in bold.
Please advice me on how to achieve this?

Thanks.

Standard email is text, so the basic idea of font and formatting and styles might be dead in the water.

What happens next really depends on the email client at the other end.
If you don't know this, what you send might look OK or it might look an awful mess.


Before HTML, the convention was to imply bold-ness by saying *bold*
which some clients would display bold as a result.


Or perhaps learn some basic HTML.
http://www.w3schools.com/html/html_formatting.asp

My clients are going to use the same email client as I am using.
But how do I send the mail in HTML format?

  1. You read and understand (some part of) RFC 2045 and its linked RFCs (see the wikipedia article mentioned below)
  2. You write a script that creates your email (or modifies a template) that meets that specification (Or, you find a tool that helps you do that task: Likely to be a better option. See links below)
  3. You invoke an email sending tool of some sort, and pass it the results of step 2, sending the email to yourself.
  4. You repeat from step 1 or 2 until satisfied
  5. You "ship it"

See also:
http://en.wikipedia.org/wiki/MIME
http://www.macosxhints.com/article.php?story=20040210105313440
http://www.pell.portland.or.us/~orc/Code/mimecode/
http://www.websurfshack.net/2009/08/mime-email-attachments-from-command-line/

I got it.
Thanks a lot.. it looks great now :)

I have a problem though, I am displaying images on the html page, I understand that the images need to have an absloute path to be displayed and the best options seems to be somewhere on my web server. where do I store the images on my web server and how do I do that?

I know it sounds naive but I am stuck on this for a long time :(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.