PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → Problem with Exporting longer Text (Memos) to Outlook
Problem with Exporting longer Text (Memos) to Outlook
Started by Mario Vrdoljak, May, 26 2004 9:35 PM - 3 replies
Posted on May, 26 2004 - 9:35 PM
Hallo Dear WD Users,
I have created a Customer File List.
The user can choose to which of them he can send an E-Mail.
The user can use a text memo for the standart text which shall also be included in the Outlook E-Mail. But with this funtion:
My body text shall be like this:
ShellExecute("mailto:" + email_string + "?body="LINE 1 - LINE 2 - LINE 3")
How can I make the outlook email look like this?
LINE 1
LINE 2
LINE 3
But how?
I tried to include CH(13) + CH(10) but it doesn't work.
Please help.
Thanks a lot!!!
Posted on May, 27 2004 - 9:47 AM
Hi Mario,
for sending mails from a WinDev application you can use WinDev commands too. It's perfectly possible to add any text to an e-mail with them. Example
IF EmailStartSMTPSession(NoSpace(OurMailUser),NoSpace(OurSmtpServer),Val(NoSpace(OurSmtpPort))) = True THEN
// Initialize email structure
Email.recipient = NoSpace(ReceiverOfMail)
Email.sender = NoSpace(OurMailAddress)
Email.Attach = NoSpace(SourceDirectory)+"\"+FileName
Email.SenderAddress = NoSpace(OurMailAddress)
Email.message = "PRICAT-Preisliste unserer Firma:"+CR+OurAddressLine1+CR+OurAddressLine2+CR+OurAddressLine3+CR+OurAddressLine4+CR
Email.NbRecipient = 1
Email.NbAttach = 1
Email.subject = "Preisliste von "+NoSpace(OurAddressLine1)+" "+NoSpace(OurAddressLine2)
// Email senden
IF NOT EmailSendMessage(NoSpace(OurMailUser)) THEN
Error("Die e-Mail mit der Preisliste konnte nicht versandt werden!","Fehler: "+ErrorInfo(errMessage))
ELSE
Info("Der Versand der Preisliste per e-Mail an xxxxxx war erfolgreich!")
END
ELSE
Error("Die e-Mail-Verbindung zu "+NoSpace(OurSmtpServer)+" konnte nicht aufgebaut werden","Fehler: "+EmailMsgError(Email.Error))
END
EmailCloseSession(NoSpace(OurMailUser))
Hallo Dear WD Users,
I have created a Customer File List.
The user can choose to which of them he can send an E-Mail.
The user can use a text memo for the standart text which shall also be included in the Outlook E-Mail. But with this funtion:
My body text shall be like this:
ShellExecute("mailto:" + email_string + "?body="LINE 1 - LINE 2 - LINE 3")
How can I make the outlook email look like this?
LINE 1
LINE 2
LINE 3
But how?
I tried to include CH(13) + CH(10) but it doesn't work.
Please help.
Thanks a lot!!!
Posted on May, 27 2004 - 10:59 AM
THANK YOU FOR YOUR HELP.
Many people wants to keep up working with their standart email software to have for example all their stuff in the mailbox like "Sended Emails and Wastebasket." The windev e-mail function is brilliant!
Thanks a lot.

Hi Mario,
for sending mails from a WinDev application you can use WinDev commands too. It's perfectly possible to add any text to an e-mail with them. Example
IF EmailStartSMTPSession(NoSpace(OurMailUser),NoSpace(OurSmtpServer),Val(NoSpace(OurSmtpPort))) = True THEN
// Initialize email structure
Email.recipient = NoSpace(ReceiverOfMail)
Email.sender = NoSpace(OurMailAddress)
Email.Attach = NoSpace(SourceDirectory)+"\"+FileName
Email.SenderAddress = NoSpace(OurMailAddress)
Email.message = "PRICAT-Preisliste unserer Firma:"+CR+OurAddressLine1+CR+OurAddressLine2+CR+OurAddressLine3+CR+OurAddressLine4+CR
Email.NbRecipient = 1
Email.NbAttach = 1
Email.subject = "Preisliste von "+NoSpace(OurAddressLine1)+" "+NoSpace(OurAddressLine2)
// Email senden
IF NOT EmailSendMessage(NoSpace(OurMailUser)) THEN
Error("Die e-Mail mit der Preisliste konnte nicht versandt werden!","Fehler: "+ErrorInfo(errMessage))
ELSE
Info("Der Versand der Preisliste per e-Mail an xxxxxx war erfolgreich!")
END
ELSE
Error("Die e-Mail-Verbindung zu "+NoSpace(OurSmtpServer)+" konnte nicht aufgebaut werden","Fehler: "+EmailMsgError(Email.Error))
END
EmailCloseSession(NoSpace(OurMailUser))
Hallo Dear WD Users,
I have created a Customer File List.
The user can choose to which of them he can send an E-Mail.
The user can use a text memo for the standart text which shall also be included in the Outlook E-Mail. But with this funtion:
My body text shall be like this:
ShellExecute("mailto:" + email_string + "?body="LINE 1 - LINE 2 - LINE 3")
How can I make the outlook email look like this?
LINE 1
LINE 2
LINE 3
But how?
I tried to include CH(13) + CH(10) but it doesn't work.
Please help.
Thanks a lot!!!
Posted on May, 27 2004 - 12:24 PM
Hi Mario,
My body text shall be like this:
ShellExecute("mailto:" + email_string + "?body="LINE 1 - LINE 2 - LINE 3")
How can I make the outlook email look like this?
LINE 1
LINE 2
LINE 3
But how?
I tried to include CH(13) + CH(10) but it doesn't work.

Change the 'CR' to "%0D%0A%"
-> ShellExecute("mailto:" + email_string + "?body="LINE 1%0D%0A%LINE 2%0D%0A%LINE 3")
Peter