Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2017-10

Getting reason for failure with SendToRaw()

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

James Richters

I'm using SendToRaw() from a console application to send an email back to myself with attachments to aid in technical support. It always works find when I send the mail to myself. I run SendToRaw() a second time with my customers email address instead of mine so I can go over things with them, but sometimes it fails, but I don't know why. SendToRaw() returns a true if successful or false if it fails, but I don't know the reason for failures. Is there some way to get an error code so I can figure out what's wrong? Or is there a better method for sending email that would give me an error code? I'm running from a single thread console application.

James