CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2001
    Location
    INDIA
    Posts
    0

    how to use mailto protocol ?

    I would like to know how to send a formatted email via html.
    I am using the form method and specifying the mailto protocol in it.
    All i want is to send all the contents of the form in a formatted form to the outlook express.

    <a href=mailto:[email protected]?subject="hello"?body="Name is:uhmnc Designation =ceo">


    ************************************** currently the results i am getting is
    name="uhmnc"designation="c.e.o"
    The result is appearing on the same line
    How to format the above text by using new line
    which i want as
    name="uhmnc"
    designation="c.e.o"





  2. #2
    Join Date
    Mar 2001
    Location
    Albuquerque, NM
    Posts
    12

    Re: how to use mailto protocol ?

    The following example shows a link that will prepare an e-mail message with multiple lines of text in the body.

    <A HREF="mailto:[email protected]?
    subject=Feedback&
    body=The%0d%0aInetSDK%0d%0aSite%0d%0aIs%0d%0aSuperlative">
    Click here to send feedback to the InetSDK.</A>



    Here is some VC++ code:
    void CApp::OnMySendMail()
    {
    CString strAddress("[email protected]");
    CString strSubject("Phone Book Entry");
    CString strBody("Dave Paxton%0d%0a1-234-567-8901%0d%[email protected]");

    CString strCommand="MailTo:" + strAddress + "?subject=" + strSubject + "&body=" + strBody;

    ShellExecute( NULL, "open", strCommand, NULL, NULL, SW_SHOWNORMAL);
    }





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured