Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mabry-MailX control
Message
From
05/09/2002 23:10:51
 
 
To
18/12/2001 13:19:42
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00595661
Message ID:
00697345
Views:
22
Well.... having just had so much work saved because I found this... I wanted to say thanks... now, I am cramming on POP3 so if you can help I would appreciate it... but you just cured by mail/x headache....

Cheers,

Ric

PS - I was born in Houston... lol....


>>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  && SMTP connection, set to 1 for ESMTP
>        .Blocking = .t.
>        .blockingMode = 1
>        .Host = "mail.yourhost.com"
>        .Connect
>        .sendMail(lcSender, lcRecipient, lcSubject, lcBody)
>        .disconnect
>    endwith
>    thisform.sending = .f.
>    this.enabled = .t.
>endif
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform