Email body - InfoPath Dev
in

InfoPath Dev

Email body

Last post 01-12-2007 01:58 AM by nukkumatti. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 01-10-2007 02:32 AM

    Email body


    try
    {
    var myOlApp = new ActiveXObject("Outlook.Application");
    newMail = myOlApp.CreateItem(0);
    newMail.To = to;
    newMail.Subject = subject;
    newMail.Body = body;
    newMail.Send();
    }
    catch(ex)
    {
    XDocument.UI.Alert(ex.description);
    }


    Hi !

    In the body : To make a space I use "\n". But how to make text in bold ?
  • 01-11-2007 10:38 AM In reply to

    I doubt you will be able to do this very easily. You would have to create an HTML-based e-mail body and this is something that I have never done from scratch. Once you have the power of HTML you can do basically anything, such as bold, underline, colors, images, tables, etc.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 01-11-2007 11:39 PM In reply to

    Hi you both,

    not sure if this is what you are looking for but for me it worked:


    MailMessage objMail = new MailMessage();
    objMail.BodyFormat = System.Web.Mail.MailFormat.Html;
    objMail.From = "[email protected]";
    objMail.To = "[email protected]";
    objMail.Subject = "Test Subject";
    //email body style
    objMail.Body = "<b>FROM:</b>" + "<font color=red>" + "Sample TEXT" + "</font>" + "<br>" +
    "<b>MAIL:</b>" + "<font color=red>" + "Some More Sample Text" + "</font>" + "<br>" +
    "<br>" + "<b>COMPANY:</b>" + "<font color=red>" + "And Even more sample text" + "</font>" + "<br>" +

    Listen to Motörhead cos they play Rock'n Roll :)
  • 01-12-2007 12:12 AM In reply to

    Thanks a lot !
  • 01-12-2007 12:16 AM In reply to

    Nice job Nukkumatti!
    I'm listening to Motörhead now as a tribute to you "cos they play Rock'n Roll"... :)
    Patrick Halstead
    Project Manager at Qdabra
  • 01-12-2007 12:26 AM In reply to

    Thx Patrick and your welcome,
    I learned so much from this forum when I first came into contact with InfoPath that I see it as a kind of duty to also share my knowledge now with others whenever my time allows it.

    You are lucky, because we are not allowed to listen to music here. Would make things much easier :)
    Listen to Motörhead cos they play Rock'n Roll :)
  • 01-12-2007 12:29 AM In reply to

    We are very happy to have someone of your caliber moderating our forum! I think I need to send you a special prize. Please send me your address in private e-mail and let me know if you have a special request from U.S.
    Patrick Halstead
    Project Manager at Qdabra
  • 01-12-2007 01:58 AM In reply to

    Thx a lot patrick.
    FYI - I am gonna answer your mail when I am back home in the evening. Don't wanna do it from here.
    Listen to Motörhead cos they play Rock'n Roll :)
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.