Re: send email with shellexecute but crlf in body does not work



This isn't surprising when you think about it. ShellExecute() is basically
like opening up a DOS window and typing a command. The CRLF starts a new
line, which isn't accepted in a DOS command.

You should look into alternatives like SMTP, Outlook automation, MAPI, CDO
.... there are a ton of ways to send email.

Dan


andipfaff wrote:
> Hi everybody,
>
> I try to send an email with shellexecute in FVP8 on Win2k with Outlook
> 2000. This the code:
>
> crlf = chr(13) + chr(10)
> t_error_datetime = "2005-10-06"
> t_error_no = "16"
>
> t_error_body = t_error_datetime + crlf + t_error_no
> t_email = "mailto:myself@xxxxxxxxxxxx?subject=something&body="; +
> t_error_body
>
> ShellExecute(0, "open", t_email, "", "", 1)
>
> Unfortunately the body text will not show my crlf. How do I have to
> pass them to Outlook so that they will work in the body part an
> seperate the message lines?
>
> Thanks in advance
> Andi


.



Relevant Pages

  • Re: how do I find what this computers IP address is under Vista
    ... Just for what it's worth, under Vista 32-bit Ultimate I can't get ip address info by simply typing "ipconfig" or "ipconfig /all" into the command box. ... In order to actually see the info I must type "command" in the "start search" box to get a DOS window, and then type "ipconfig /all" in the DOS window. ...
    (microsoft.public.windows.vista.general)
  • Re: ShellExecute
    ... The redirection operators, are part of the command ... Althought this API function is called "shellexecute" I doubt ... it's sending the command to the CLI; rather, ...
    (borland.public.delphi.nativeapi)
  • Re: Command line behavior has changed
    ... Unfortunately, in my case, even a command which includes switches will ... cause the same problem of premature DOS window closing. ... cmd /k ipconfig /all ...
    (microsoft.public.windowsxp.general)
  • Re: Command line behavior has changed
    ... Unfortunately, in my case, even a command which includes switches will ... cause the same problem of premature DOS window closing. ... cmd /k ipconfig /all ...
    (microsoft.public.windowsxp.general)
  • Re: ps2pdf???
    ... asking for the output filename. ... a way to pass the output filename on the command line, ... No ps2pdf in my mikTeX. ... Opening a DOS window, cd-ing to the directory ...
    (comp.text.tex)