Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 5 Jahren, 1 Monat
Letzter Beitrag:
vor 5 Jahren, 1 Monat
Beteiligte Autoren:
Jeff Graham, Alexandre Leclerc, Al

WD 17 - Create and display email draft

Startbeitrag von Jeff Graham am 03.06.2013 21:18


I want to create an email draft to be displayed and then completed by the user. The user would send the email. All the help I see is for creating and sending without user edit. I must be missing something. The users currently use Outlook.

Any help would be appreciated,


Hello Jeff

There is an email example in the CRM example that may help you out. It is in the "Contacts" part of the CRM example as option : "Write to this contact" - it should really say "Email this contact"

The CRM example will not come up in the Windev IDE as part of the examples process, it is a separate stand alone project but has some nice stuff in it once you get used to all the planes.
C:\WinDev 17\Examples\Complete examples\CRM


von Al - am 04.06.2013 10:57
Hi Al,

Thanks for your response. I am familiar with that example and I also looked at WD Mail example. However, I don't want to replace their Outlook email, just create an draft message for them to complete.

Thinking about the issue, the technical support request option to " - send it from your own email software" is what I want to do. But that option requires you to attach your files after the creation. So maybe it is not doable easily. In fact, the support request requires you to copy the text. So all they do is set the recipient.

I am going to explore the Outlook commands and the WD Mail example further.

von Jeff Graham - am 04.06.2013 14:11
Hi Jeff,

I think you can simply open a blank email session, then send the email:
nIDSession = EmailStartSession("")
bSent = EmailSendMessage(nIDSession,MyEmail)

It should open the default email application and make the email ready to be sent. From my memory, this will not send the email directly - but I can't remember for sure. I know there were some changes of behaviour between version 16 and 17 concerning this behaviour and the introduction of the Email variable instead of the structure.

If you have issues, try with the email structure directly. We had issues regarding some different behaviour between the Email structure and the Email variable. Also, when doing that we were not giving the email address, so the user had to complete the email address himself. (Like the "Send this file by email" command of Windows.)

Best regards,
Alexandre Leclerc

von Alexandre Leclerc - am 04.06.2013 15:28
FYI The response from technical support on this issue:
PC Tech Support
You must use the WINDOWS function "Mailto" but with her you could not attach files.
Example : ShellExecute(" mailto:Supportgratuit@pcsoft.fr ?subject=Sujet : LST &body=Texte : Le sommaire de la LST.")

This treatment should certainly be achievable with an OLE Automation dialogue.
The OLE Automation dialogue is not a language "PC SOFT " our Free Technical Support will unfortunately not help you on that part of development.

There are many documents providing information about the details of these commands.

I just decided to add a window for editing the subject and text then sent the message. Later I can add the ability to add recipients, etc. like the WD Mail example but not create a substitute for Outlook.

Thanks for your suggestions,

von Jeff Graham - am 06.06.2013 16:23
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.