Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keeping returns in email
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00998431
Message ID:
01319578
Vues:
23
PMFJI, but to get a hard return in HTML, use the string:

CRLF = [
]

Paragraph endings should use the following:

PARA = [

]

>I have tried your suggestion, I have tried defining CrLf, nothing works.
>I am using the following code, any suggestions will be greatly appreciated;
>

>#DEFINE CrLf Chr(13)+Chr(10)
>oOutLook = CREATEOBJECT("Outlook.Application")
>oSafeItem = CREATEOBJECT('Redemption.SafeMailItem')
>*open redemption
>oNameSpace = oOutLook.GetNameSpace('MAPI')
>oNameSpace.Logon
>oItem = oOutLook.createitem(0) && create new mail message
>oSafeItem.item = oItem && create safe item object
>lsBody = "This is so easy!!"+CrLf ;
>         +"I have used similar code to create " ;
>	 +"this email without receiving the security warning"
>*may use if it works -> does not
>lsBody = strtran(lsBody, chr(13)+chr(10), "%0d%0a" ) && urlencode
>*!*	lsBody = strtran(lsBody, chr(13), "%0d" )
>*!*	lsBody = strtran(lsBody, chr(10), "%0a" )
>WITH oSafeItem
>	*oSafeItem.to = "chuck.j.williams@dep.state.fl.us"
>	* best to use recipients
>	.recipients.ADD("chuck.j.williams@dep.state.fl.us")
>	.recipients.ResolveAll
>	.subject = ("This is security FREE email")
>	.RTFBody= .RTFBody + lsBody
>	.save()
>	.send()
>ENDWITH
>
>
>>You have to urlencode CR and LF. See correction inline.
>>
>>>I'm using the shellexecute to launch the email client and send the subject and body text.
>>
>>>PARAMETERS lcSubject, lcMessagebody
>>>DECLARE INTEGER ShellExecute ;
>>>    IN SHELL32.DLL ;
>>>    INTEGER nWinHandle,;
>>>    STRING cOperation,;
>>>    STRING cFileName,;
>>>    STRING cParameters,;
>>>    STRING cDirectory,;
>>>    INTEGER nShowWindow
>>>
>>>lcEmailAddress = warapprove.altname
>>>
>>***
>>lcMessageBody = strtran(lcMessageBody, chr(13)+chr(10), "%0d%0a"
>>***
>>>ShellExecute(0, "", "mailto:" + lcEmailAddress + "?Subject=" + lcSubject + ;
>>>                    "&body=" + lcMessageBody, "", "", 1)
>>
>>>
>>>
>>>The only problem I'm having is that all the returns are stripped out of the body when the text comes into the email client. Any ideas on how to preserve the returns in the edit box when the text comes over to the email?
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform