Email via SMTP

Hi All,

I was using the Mapi32.dll calls to send emails form a background task, but with this new Microsoft security issue 'A program is trying to automatically send email on your behalf', I can no longer do this. The problem being that the background task runs unattended (it is a System Maintenance job that reports certain conditions). I found the source code on the progress website for sending mail via SMTP, but I keep getting the same error.

Server: 501 space seperator provided without argument

Has anyone else gotten this and managed to get around it?

Thanx for any help offered, it will be greatly appreciated.
Cya.
 
waynesingh said:
Hi All,

I was using the Mapi32.dll calls to send emails form a background task, but with this new Microsoft security issue 'A program is trying to automatically send email on your behalf', I can no longer do this. The problem being that the background task runs unattended (it is a System Maintenance job that reports certain conditions). I found the source code on the progress website for sending mail via SMTP, but I keep getting the same error.

Server: 501 space seperator provided without argument

Has anyone else gotten this and managed to get around it?

Thanx for any help offered, it will be greatly appreciated.
Cya.

I finally found the problem, as it turns out the vBody text was never being sent. You need to change the following line:
RUN newState(5, "DATA ~r~n").
to:
RUN newState(5, "DATA " + vBody + "~r~n").

Hope this helps someone out there anyway.

Cya's.
 
Top