Embedding html in $message

I may be going about this the wrong way but I am trying to
automate a report to be sent to a mail recipient.
I have created a php page report and then added the attached
code to create an e-mail to a specific individual.
As you will see, the $message variable only carries simple
text as it is part of a php script (which does not like embedded
<script>)
Does anyone know how to go about putting in a dynamic table
for example?
Any help would be much appreciated.
Thanks

Talks about HTML email in this tutorial:
http://www.sitepoint.com/article/advanced-email-php
Ken Ford
Adobe Community Expert - Dreamweaver
Fordwebs, LLC
http://www.fordwebs.com
"RichardODreamweaver" <[email protected]>
wrote in message
news:[email protected]...
>I may be going about this the wrong way but I am trying
to automate a
>report to
> be sent to a mail recipient.
>
> I have created a php page report and then added the
attached code to
> create an
> e-mail to a specific individual.
>
> As you will see, the $message variable only carries
simple text as it is
> part
> of a php script (which does not like embedded
<script>)
>
> Does anyone know how to go about putting in a dynamic
table for example?
>
> Any help would be much appreciated.
>
> Thanks
>
> <?php if ($totalRows_outstandingquotes > 0) { //
Process if recordset not
> empty ?>
> <?php
> $contactemail = "[email protected]";
>
> $headers = 'MIME-Version: 1.0' . "\n";
> $headers .= 'Content-type: text/html;
charset=iso-8859-1' . "\n";
> $headers .= "Content-Transfer-Encoding: 7bit\n";
> $headers .= 'From: Me (' .stripslashes($_POST['email']).
')' . "\n";
> $headers .= 'Reply-To: '.stripslashes($_POST['email']).
"\n";
> $headers .= 'Return-Path:'.$contactemail . "\n";
> $headers .= 'X-Sender: '.$contactemail. "\n";
> $headers .= 'X-Mailers: PHP /'.phpversion() . "\n";
>
> $subject = "CRM Automated Report: New Opportunities
Pending Approval";
>
> $message = "
> <p>There is at least one opportunity, with a
quantity less than 4,
> pending
> approval.<p>
> <p>to view and approve them, you will need to
login to the CRM
> Database<p>
> ";
>
>
> ini_set(sendmail_from,$contactemail);
>
> if (@mail('Me
>
<'.$contactemail.'>',stripslashes($subject),stripslashes($message),stripslashes(
> $headers)))
> {
> echo ('<h1>Sent</h1><p>This automated
report has been successfully
> sent.</p>');
> }
> else
> {
> echo ('<h1>Sorry!</h1><p>Your message
has failed to send. Please try
> again
> later.</p>');
> }
>
>
> ini_restore( sendmail_from );
>
> ?>
> <?php } ?>
>

Similar Messages

  • Office 365 Outlook 2013 client not displaying embedded HTML graphics in message body

    I am using Office 365 Outlook 2013 client for Gmail and my Service Provider e-mail through POP/ SMTP configuration.
    The e-mail message is not displaying the embedded HTML graphics.
    How I can I get it to display the embedded graphics?
    I have no problem when I was using Outlook 2007 client, when got this problem after I started using Outlook 2013.
    Please helps.

    Thank you for sharing your solutions and experience here. It will be very beneficial for other community members who have similar questions.
    Tony Chen
    TechNet Community Support

  • HTML email is saved, the PR_RTF_COMPRESSED property does not contain embedded HTML

    Hi
    When HTML email is saved, the PR_RTF_COMPRESSED property does not contain embedded HTML.
    This causes that Outlook does not open saved message as HTML message.
    When MAPI profile is configured with CACHE mode ON, the PR_RTF_PROPERTY contains embedded HTML
    and Outlook opens saved email correctly as HTML.
    Do you have any idea what can cause such behavior or how to configure MAPI profile to save embedded HTML into PR_RTF_COMPRESSED when CACHE mode is OFF?  If you need more information let me know.
    Environment description:
    Server: Exchange 2013
    Client: Outlook 2013
    MAPI profile configured with CACHE mode OFF
    Thanks you very much for any advice.

    This is bug in Exchange 2013 see
    http://support.microsoft.com/kb/2862739/EN-US and also
    http://social.technet.microsoft.com/Forums/en-US/58f00a26-e20b-4e1c-9790-9969ab423b2f/move-message-with-attachment-from-one-mailbox-to-another-problem
    Currently there is no fix for this and the only workaround is to use Cache Mode. This only affects Exchange 2013 and Office365 (which is on 2013)
    Cheers
    Glen

  • Enhancing all standard texts to accept HTML format message

    Hello every one,
    Please help me with your inputs in my requirement.
    The user basically requires enhancing all standard texts to accept HTML format message being sent to recipients.
    Can you please let me know how can this be achieved?
    Thanks in Advance.
    Jayant Sahu.

    OK, I figured it out. Here's the silly key item:
    You must have a dynamic text field with embedded fonts in
    every font you might use with the html tags!
    Who would've thought. I added additional fields to my file
    (off the stage) with "foo" set to verdana bold, verdana italic, and
    verdana bold italic and embedded Basic Latin. Now it works.
    Thanks for your help.

  • How do i attach a file to an email as an attachment and not embeded in the message?

    how do i attach a file to an email as an attachment and not embeded in the message?

    This question has been asked and answered several times already.
    Any file attached to an e-mail message is an attachment. There is no other possibility -- the mail protocol does not allow it.
    However, different e-mail clients may have different ways of displaying or viewing attachments, depending on their settings and the type of file attached.
    If you're having problems with Windows users complaining about your messages, follow these instructions
    <http://docs.info.apple.com/article.html?path=Mail/4.0/en/9965.html>

  • Create Incoming Mail Rule Based on Embedded HTML in Emails in Mac Mail?

    I want to filter a selection of incoming emails in MAC MAIL that have an image embedded into the email. The image is the only thing that will distinguish the emails apart and so I'm wondering if it is possible to filter based on embedded html in an email? If so how? Thanks!

    There are no embedded images in HTML mail; it's an attachment. If you want to filter out messages with attachments of one or more types, you need to create a Rule that looks for that criteria and then transfers those messages to your desired location.
    For example, if you wanted to filter out messages that contained .gif images, you'd setup a Rule where "Any Attachment Name" "Ends with" ".gif" and then choose what you want to happen to those messages.
    And the program is Mail; not MAC MAIL.

  • Web Intelligence: Save Report as PDF and with embedded HTML code

    Hi all.
    Sorry but I'm not able to find any post about this matter, please feel free to provide links if you know existing topics about this problem.
    We created a beautiful report with HTML5 code embedded into a blank cell and we are now trying to export it in a printable format (e.g.: PDF or HTML).
    As you know (as per manual information) it is not possible to export a report with embedded HTML code and keeping it in the output (cell with embedded HTML code is rendered blank).
    My question is: is there a known workaround or an alternative solution to export the report and keep its content?
    Print screen is not a valid option :-P
    Thanks for the support or any suggestions
    Stecas

    Product limitation; vote for change on ideaplace, etc. I don't believe there is an *easy* workaround, but see:
    https://scn.sap.com/thread/3149287
    HTH
    NMG

  • How to get embedded HTML code of slideshow created with photoshop elements 8?????

    How do I get the EMBEDDED HTML CODE after creating a SLIDE SHOW using Photoshop Elements 8?????

    You're welcome. How about awarding them duke stars?
    edit: cheers!

  • Embedding html in .java file comments

    for years now the convention has been to liberally use html in java source code comments
    to beautify javadocs. for example, i have taken this out of the source code for java.lang.System:
    * The <code>System</code> class contains several useful class fields
    * and methods. It cannot be instantiated.
    * <p>
    * Among the facilities provided by the <code>System</code> class
    * are standard input, standard output, and error output streams;
    * access to externally defined "properties"; a means of
    * loading files and libraries; and a utility method for quickly
    * copying a portion of an array.
    * @author Arthur van Hoff
    * @version 1.125, 12/03/01
    * @since JDK1.0
    the problem i see with this is that the tags must be stripped if one is producing
    documentation in formats other than html (swing doclet, or pdf doclet, or any
    application of xml).
    aren't we forever tying ourselves to html? is there any intention on the part of
    j2se/j2ee developers to discontinue this practice? i've begun working on a xul
    doclet and am having to enclose the documentation in cdata to maintain the
    validity of the document i produce (i could also just strip out the tags of course).
    thanks, eitan

    Hi Eitan,
    I see little problem as long we provide a way to
    parse whatever format is being used.
    Please take a look at the commentdom package in
    the "Doclet Refactoring Design" under "What's New"
    on the right side of the Javadoc home page:
    http://java.sun.com/j2se/javadoc/
    Here's its description:
    com.sun.tools.doclet.toolkit.util.commentdom
    DocComment to DOM Translator - Documentation comment contains embedded HTML,
    Javadoc inline tags as well as custom inline tags. This package will contain classes that will help
    generate a DOM tree for the documentation comment. This can be of great help for doclets that
    generate documentation in formats other than HTML. Such doclets don?t have to undergo the
    tedious task of parsing the documentation comments for all the tags. Doclets can then directly
    traverse the DOM tree and then convert the tags to appropriate format.
    The DOM tree will adhere to the doccomment DTD that will be published later. The DTD will
    allow required HTML tags along with their attributes as defined in HTML4.0 specifications. The
    DTD will also support Javadoc-defined inline tags as well as user-defined custom inline tags.
    We plan for the doclet toolkit other than this part to be in Tiger;
    we haven't committed dates to delivering this piece, but feel it
    would be an important part of the toolkit.
    -Doug Kramer
    Javadoc team

  • Mail in 0S 10.8 can't open web links embedded in mail message

    Mail in OS 10.8 can't open web links embedded in mail messages. Just started this AM but I changed nothing.

    Please don't post here about beta software. There are confidential forums set aside for developers to use. Developer Forums. If you are a paid developer or seed tester then it's a violation of your NDA to post in these forums. If you aren't a developer or seed tester then you have an illegal copy.

  • Embedding html in source code?

    hello,
    im trying to insert some code into the source code of the site, in order to then be able to embed specific html on specfic pages pertaining to specific videos i have for sale.
    how do i access the source code?
    cheers
    daniel

    Hello,
    Please refer to the link below on embedding HTML in Muse.
    http://helpx.adobe.com/muse/topics/embedding-html.html
    If you are willing to insert certain code in Body then you can use Object > Insert HTML.
    If you want to put the code in head then you need to go to the page and go to Page > Page Properties > Metadata > HTMl for <head> > Paste the code.
    For more options you can refer to the link above.
    Regards
    Vivek

  • Embedding html from youtube no longer works

    embedding html from youtube no longer works??

    You need to select the 'Enhanced Privacy' check box in YouTube before getting your embed code.

  • Embedding HTML in XML CDATA and encoding issues

    Hi all,
    I'm embedding HTML code in a CDATA section. My problem is that, depending on the document, the HTML can be encoded in many formats. I borrowed a piece of code that sniffs that format so i can create String in the "right" encoding (or at least the one that was guessed).
    - If I directly injected those in the CDATA section, i guess they'd be encoded in UTF-8 and some character would be misinterpreted?
    - What if i would transcode the HTML from the sniffed format to utf-8?
    -Are there any issues woth doing this?
    Sorry if this is a dumb question but I'm quite new to that kind of encoding issues.
    BTW i'm using DOM.
    Thanks
    lexo

    I don't know if it's a dumb question. I just don't understand it at all. Encoding issues only arise when you write data from a Java program to an external location, or when you read data from an external location into a Java program. And none of the activities you mentioned there have anything to do with that.
    When you write your XML to an external file, or wherever you write it to, it gets encoded at that moment. The whole thing. Elements, attributes, CDATA sections, the whole thing. Doesn't matter what's in it, the whole thing gets encoded in whatever charset was chosen.
    Does that help?

  • Using Safari to send HTML Mail message but Mail keeps dropping images?

    I'd like to use Safari to send html Mail messages, but when I click on File>Mail Contents... Mail opens a new window but my graphics are gone. (I'm creating the html pages using MS Word for the Mac.) I get a flash of the graphics for a second, and then they are replaced by a little blue lego. Any ideas? I've tried all kinds of mail preferences but nothing seems to help.

    Figured it out (at least one way): had to load the image to a server and then add the image as a link only (uncheck "save picture with document" box).

  • Designing Embedded HTML Page with iWeb

    I designed a html page with with an embedded html page within it. It all looks fine in iWeb, but when I upload the page to the intenet and I try to view this page it does not come up properly. Although I initially see the page come up as I designed it (for a fraction of a second) it then disapears and I only see the page I embedded on my page.
    I added the following codes in HTML Snippet:
    <object data=http://www.mls.ca/PropertyResults.aspx?&vs=Residential&ret=300&curPage=PropertySearch.a spx&sts=0-0&beds=0-0&baths=0-0&bt=1%2c16%2c17&atsg=%2c&ci=cartierville&pro=4&mp= 500000-0-0&mrt=0-0-4&trt=2&of=1&ps=10&o=D width="600" height="400"> <embed src=http://www.mls.ca/PropertyResults.aspx?&vs=Residential&ret=300&curPage=PropertySearch.a spx&sts=0-0&beds=0-0&baths=0-0&bt=1%2c16%2c17&atsg=%2c&ci=cartierville&pro=4&mp= 500000-0-0&mrt=0-0-4&trt=2&of=1&ps=10&o=D width="600" height="400"> </embed> Embedd a web page within another web page. </object>
    <object data=http://www.mls.ca width="600" height="400"> <embed src=http://www.mls.ca width="600" height="400"> </embed> Embedd a web page within another web page. </object>
    As I said, the above pages come up fine in iWeb but not when I search them with Sagari.
    Can someone please help with this. Thanks, Padano

    This is the proper code :
    <iframe src="http://url.to.file.html" frameborder="0" width="500" height="500" scrolling="no" allowTransparency="true"></iframe>
    You can also use this :
    <div style="width: 650px; height: 650px">
      <script language="JavaScript">
        location.replace('../../../your files.html');
      </script>
    </div>
    Source : iframe alternative in the HTML Snippet
    And on this page you can see how to use <object> for html, png and jpg files :
    Embed content with the <object> HTML element

Maybe you are looking for

  • Ability to open PDF in I.E. suddenly stopped

    With Internet Explorer running (and NO adobe products currently running) a click on a PDF icon gives the message "The adobe acrobat/reader that is running can not be used to view PDF files in a web browser. Adobe Acrobat/Reader version 8 or 9 is requ

  • RSS Feeds are not updating in Mail

    For a few weeks now my RSS feeds in Mail have not been updating at all.  The settings for checking and updating RSS feeds have not been changed. Is this a mail issue or an ISP issue?

  • How can I use the "Save As..." feature in Pages or Text Edit again?

    After updating both the programs to Lion OS X standards, it has lost the functionality to do so.

  • Monitor JMS Foreign Server

    Hi,           I have configured the IBM MQ server as a foreign server in one of the JMS Module of WLS9.1. I am able to identify it using JMX (MBeans).(I thought this was a good approach if u have any other approach for it? reply me).           Now i

  • Seeking a longer power cord???  (G4-flatscreen IMAC)

    Are longer power cords available rather than the standard 6-footers? If not, does anyone have a solution that would get me to at least 8 feet? Thanks.