Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Email with Attachment without using Outlook
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00923038
Message ID:
00927462
Vues:
30
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform