Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to email outllook with attachments
Message
De
02/03/2004 09:04:44
 
 
À
01/03/2004 20:53:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00882218
Message ID:
00882311
Vues:
19
how can i add attachments to this email? or is there any better code to send email using outlook with attachments?
#DEFINE olMailItem   0
#define olOriginator 0
#define olTo         1
#define olCC         2
#define olBCC        3

loOutlook = CREATEOBJECT( 'Outlook.Application' )
loMsg = loOutlook.CreateItem( olMailItem )
IF VARTYPE( loMsg ) = 'O'
  WITH loMsg
    *** Set the required message properties
    .Subject = "This is a test message"
    .Body = "Here are some attachments"
    *** Add the recipients
    loRecipient = .Recipients.Add( "someone@somedomain.com" )
    loRecipient.Type = olTo         
    *** And finally, add the attachment 
    .Attachments.Add( "d:\MyFullPath\MyDocument.zip" )
    *** And send it off
    .Send()
  ENDWITH
ENDIF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform