?
Solved

Newline in mail

Posted on 2004-08-18
4
Medium Priority
?
504 Views
Last Modified: 2010-08-05
Hello,

My application send an mail like this :

 > mailBody := 'mailto:' +operateur.mailadress + '?subject=refus&body=Line1' + #10#13 + 'Line2' ;
 > shellexecute(self.Handle,'open', pansichar( mailBody)  ,nil,nil,0);

But in my message 'Line 1' and 'Line2' are in the same line.

How can do to have 'Line2' under 'Line1' in my body ?

Thanks

Sang-Do
0
Comment
Question by:PHD
  • 3
4 Comments
 
LVL 3

Accepted Solution

by:
Tyrsis earned 2000 total points
ID: 11828560
Hi there.

Hmm, I'm assuming this is in Delphi?  

Add HttpApp to your uses clause.  You need to encoude the #13#10 characters.  Do the following:

var
    szMailBody : String;
begin
    szMailBody := 'mailto:me@myplace.com?subject=refus&body=' + HttpEncode('Line1' + #13#10 + 'Line2');
    ShellExecute(self.Handle, 'open', PAnsiChar(szMailBody), nil, nil, 0);
end;

Hope this helps!

Tyrsis
0
 
LVL 3

Expert Comment

by:Tyrsis
ID: 11828564
Uhm, oops, I put my email address in there by mistake.  doh.  Remove that obviously.
0
 
LVL 6

Author Comment

by:PHD
ID: 11828605
It is in Delphi. Your solution workfine.

doh stands for ??
0
 
LVL 3

Expert Comment

by:Tyrsis
ID: 11828627
Doh = oops.  From the TV show Simpsons.  Nevermind :)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question