>>Has anyone used Mabry's MailX control to send email from VFP? After nixing just about every other option, I'm exploring this one as my last hope. Does anyone have any sample VFP code?
>
>Elyse,
>
>This is an oversimplified example, but hopefully it will get you started. Since you need authentication, you will change connectionType to 1, and you will need to add lines for the user name and password properties.
>
>Also, to make it more interactive and bulletproof during the sending process, you need to read the information on blocking and blocking mode on Mabry's website. They also have HTML examples.
>
>Create a form, and drop the MailX activeX on the form. In this example, I named the activeX control oSmtp. Put the following code in the click method of a command button. Add a property to the form called 'sending'.
>
>* command1.click()
>local lcSender, lcRecipient, lcSubject, lcBody
>
>lcRecipient = "recipient@somewhere.com"
>lcSubject = "test"
>lcBody = "testing..."
>
>if !thisform.sending
>
> lcSender = "youremailaddress.somewhere.com"
>
> thisform.sending = .t.
> this.enabled = .f.
> thisform.refresh()
> with thisform.oSmtp
> .ConnectionType = 0
> .Blocking = .t.
> .blockingMode = 1
> .Host = "mail.yourhost.com"
> .Connect
> .sendMail(lcSender, lcRecipient, lcSubject, lcBody)
> .disconnect
> endwith
> thisform.sending = .f.
> this.enabled = .t.
>endif
>
This is a good start, but I'll need to send attachments, HTML text, etc., so I think I need to use the SendMessage() option. Anyone have any examples of that?
Elyse Pomerantz