Skip to main content
Inspiring
May 7, 2008
Question

Emailing a page content

  • May 7, 2008
  • 7 replies
  • 803 views
Dear Friends,

Thanks in advance...


Like printer friendly format, how can i implement emailing a page content?.

When user click on email icon on the page, page content need to open in default mail client as attachment or page content inside mail client.

How can i do this?.

Attaching page content or copy page content in email message...which is possible to implement?. How to do this?.
    This topic has been closed for replies.

    7 replies

    AdomacroAuthor
    Inspiring
    May 9, 2008
    Thanks Bob,
    Please see the code...

    How can i set up attribute to html, if i use below syntax for sending email?.


    i am using danielmroberts's syntax. Thanks Daniel.

    <cfset e_subject = "Application Email">
    <cfsavecontent variable="e_body">
    Emp Number : #frm_emp_no#
    Date Joined: #frm_dt_join#
    Created By : #client.fname##client.lname#
    Address : #frm_add_var#
    Description:#frm_desc#
    </cfsavecontent>


    <a href="mailto:?subject=#urlEncodedFormat(e_subject )#&body=#urlEncodedFormat(e_body)#">Send Link To Friend</a>

    Result email content is coming like this
    Emp Number : 1003Date Joined: 04/24/2008Created By : JLizAddress : Address ValueDescription:description here
    Inspiring
    May 9, 2008
    Adomacro,

    Disregard my comment about cfmail. That would only apply to mail created by the ColdFusion server.

    To instruct the mail client to add spaces try adding %0A within your hyperlink anywhere you want a newline.

    See attached HTML sample.
    AdomacroAuthor
    Inspiring
    May 9, 2008
    Thanks Dan,

    Email client is outlook
    Inspiring
    May 8, 2008
    use coldfusion and html tags to format your variable. Bear in mind that different email clients will render it differently.
    AdomacroAuthor
    Inspiring
    May 8, 2008
    mail body is coming like this...

    Emp Number : 1003Date Joined: 04/24/2008Created By : JLizAddress : Address ValueDescription:description here


    how to format this?.

    is there a better way to store in variable and send as email?.
    Inspiring
    May 8, 2008
    quote:

    Originally posted by: Adomacro
    mail body is coming like this...

    Emp Number : 1003Date Joined: 04/24/2008Created By : JLizAddress : Address ValueDescription:description here


    how to format this?.

    is there a better way to store in variable and send as email?.


    Assuming the body of your email contains html markup you also need to set the type attribute of the cfmail tag to "html". If this does not help you please post your code.

    AdomacroAuthor
    Inspiring
    May 8, 2008
    cfsavecontent content inside email is coming as big junk of text...

    how to format content inside email.....

    <cfsavecontent variable="body">
    Check out this website:
    http://www.etc....com/page
    </cfsavecontent>

    or how to format cfsavecontent content?.
    Inspiring
    May 8, 2008
    danielmroberts started out the same way I would have with cfsavecontent. My way would be to save all the page content as a variable. Then you could output that that variable on either a web page or in the mail body.
    Inspiring
    May 7, 2008
    Not sure if you can include the content of an html page as the content for the email client since it is html. If you want to have ColdFusion there are more capabilities but other things to worry about as well.

    What you can do is include content on the email link as I show below.