Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email with Attachment without using Outlook
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00923038
Message ID:
00927462
Views:
31
If you have access to SMTP, you can do the following:

The only issue is that the oSMTP.From can not be blank.

oSMTP = CREATEOBJECT("cdo.message")
oSMTP.To = THISFORM.txtTo.VALUE
oSMTP.From = THISFORM.txtFrom.VALUE
oSMTP.Subject = THISFORM.txtSubject.VALUE
oSMTP.TextBody = THISFORM.edtMessage.VALUE + CHR(13) + CHR(13)
IF THISFORM.txtNumAttachments.VALUE > 0
oSMTP.AddAttachment(THISFORM.Attachment1)
ENDIF
oSMTP.Configuration.Fields.Item ;("http://schemas.microsoft.com/cdo/configuration/sendusing").VALUE = 2
oSMTP.Configuration.FIELDS.Item ;("http://schemas.microsoft.com/cdo/configuration/smtpserver").VALUE ;
= "169.155.24.4"
oSMTP.Configuration.FIELDS.Item ;("http://schemas.microsoft.com/cdo/configuration/smtpserverport").VALUE = 25
oSMTP.Configuration.FIELDS.UPDATE
oSMTP.Send()
RELEASE oSMTP

The oSMTP.Configuration.FIELDS.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver").VALUE = is the SMTP server IP Address.

Any questions please let me know.

Thanks,

Warren Murphey
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform