Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending email via mapimess & avoid checking for new email
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Sending email via mapimess & avoid checking for new email
Divers
Thread ID:
00895021
Message ID:
00895021
Vues:
80
The problem is that whenever I use the mapimess send function it first goes to check for new email before sending out the message. That is disruptive and with all the spam these days considerably delays sending an email message out. The users have outlook express on XP and '98. VFP is version 7. My code is below. Is there any way to avoid the problem?

thisform.addobject("Session1","mapisess") && must subclass for license reason
thisform.addobject("Message1","mapimess") && class is in taistyle
* Call the Signon method of the MAPISession control. If the user is not
* logged into mail, this will prompt the user to sign on. This also sets
* the SessionId property for the MAPIsession control:
LOCAL lccurdir
lccurdir = CURDIR() && signon changes it
thisform.Session1.signon
* Set the SessionId of the MAPIMessage control to the SessionId of the
* MAPISession control, which was just obtained:
thisform.Message1.sessionid = thisform.Session1.sessionid
* Compose an e-mail message and set the subject line and Message text:
thisform.Message1.compose
* Index is base 0 while count is base 1. Setting index >= count adds recipient(s)
* In .compose, recipcount is initialized at 0
thisform.Message1.recipIndex = 0 && this increments count to 1
thisform.Message1.recipDisplayName = "" && leave blank to see actual address in "To:" field of email
thisform.Message1.recipAddress = thisform.to_email_addr.value
thisform.Message1.recipType = 1 && regular recipient (vs 3 for bcc)
thisform.Message1.msgsubject = "Data files"
thisform.Message1.msgnotetext = "Data files are attached."
thisform.Message1.AttachmentIndex = 0
thisform.Message1.AttachmentPathName = thisform.to_path_file.value
thisform.Message1.AttachmentPosition = 0
* Sends the e-mail message. The (1) is required to send the message.
thisform.Message1.send(1)
* Optionally, sign off from mail:
thisform.Session1.signoff
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform