Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 4 Jahren, 11 Monaten
Letzter Beitrag:
vor 4 Jahren, 11 Monaten
Beteiligte Autoren:
Stefan Bentvelsen, Piet van Zanten, Peter Holemans

[WD17] HTML email send via Outlook

Startbeitrag von Stefan Bentvelsen am 03.05.2013 09:30

Hi,

I send emails from my software, via SMTP or Outlook (MAPI).
Via SMTP this works OK. Via Outlook, it's working, but the bodytext doesn't look good.

* When I put plain text in Email.HTML, the text is OK, but the linefeeds are gone. Everything is displayed on one line in the received email.
* When I put HTML text in Email.HTML, the bodytext in the received email contains vivible HTML-code. Even if I use EmailImportHTML(MyHTMLString,fTempDir()).

Am I missing something? Suggestions will be higly appreciated.

Antworten:

Hi Stephan,

I guess you tags are not correct.
Do the following first:
- Set a breakpoint before assigning email.html
- Inspect the value in the debugger
- Copy/paste in notepad and save as .htm
- Try to open with IE

If it opens in IE, it means your html code is correct and it should work.

Cheers,

Peter H.

von Peter Holemans - am 03.05.2013 09:46
Hi Stefan,

Do you use the email.html member?
IF bHTML THEN
Email.Message=""
Email.HTML=sContent
ELSE
Email.Message=sContent
Email.HTML=""
END

Regards,
Piet

von Piet van Zanten - am 04.05.2013 09:40
Hi Peter,

it is very basic HTML-code but in IE, it is showed like it should, OK.

In the outbox the email is shown as plain text, also OK.
In the inbox, after receiving the mail, the text is shown on one coninues line (without linefeeds), but with all the HTML-tags !

von Stefan Bentvelsen - am 07.05.2013 11:42
Hi Piet,

yes, I use the Email.HTML member. But I fill both the plain text member with plain text as the HTML member with HTML text. If I only fill the plain text, I get no text at all in my email body.

von Stefan Bentvelsen - am 07.05.2013 11:45
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.