Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • TripleHearts 3 posts 23 karma points
    Feb 13, 2013 @ 15:59
    TripleHearts
    0

    umbraco.Library.SendMail (a,b,c,d,false) function

     

    Hello to you ,

    I'm just starting with umbraco as my choice for a CMS system and i have a question about the umbraco.ibrary.sendmail() function.

     

    I created a .net usercontrol in Visual studio 2010. I formatted the e-mail output in .ascx file for the output body like this for the html output in the c# code behind as in the snippet below:

    string str = null;

                    string htmlStart = "<body><html>";

                    string htmlEnd = "</body></html>";

     

                    //string CompanyLogoBody = "<img src=\"cid:companylogo\">";  this cant be done 

     

                    //Lets prepare the message

                    str = htmlStart;// +CompanyLogoBody;

                    str = str + "<table border='1'><tr><td>Name:</td><td>" + tb_name.Text;

                    str = str + "</td><tr><td>E-mail:</td><td>" + tb_email.Text;

                    str = str + "</td></tr><tr><td>Phonenumber:</td><td>" + tb_phone.Text;

                    str = str + "</td></tr><tr><td>Company:</td><td>" + tb_company.Text;

     

      str = str + "</td></tr><tr><td>Remarks:</td><td>" + tb_msg.Text;

                    str = str + "</td></tr>" + htmlEnd;--

     

     umbraco.library.SendMail(recipient, sender, subject, mailbody, true);  // true = the content is html

    Questions:

    1. After sending the mailout put is ok, but the web page will redisplay the in the msg box the complete message including the table markup. Is there some way to supress this?

    2. is there a way to include in this email a cid reference to a logo picture?

    Because In Visual studio i cant find no other reference to another sendmailfunction  umbraco.library.SendMail() funtion. It seems that the only option i have is to bypass the standard umbraco;library.sendmail().

     

Please Sign in or register to post replies

Write your reply to:

Draft