Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MAPI - Sending Attachments to Recipients Programmaticall
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00261254
Message ID:
00262091
Vues:
27
>>>>Hi William -- Yeah, sorry I cut out the code for the profile. I didn't understand it, and I was coupling your suggestions along with the following paper from Microsoft:
>>>>
>>>>Q136638 - HOWTO: Send E-mail Programmatically Using MSMAPI OLE Control
>>>>
>>>>Microsoft's paper didn't have anything in there about the profile. As you can see from my work in trying to look up the information on my own from Microsoft, I'm not asking anybody for a free ride here. However, I'm having a terrible time trying to get everything to work like I need it to. I very much appreciate your help on this. I feel like I'm very close now. If I can just get a few more details ironed out, I think I'll be there.
>>>>
>>>>As you suggested, I took a look in Outlook under Tools - Options - General tab - Startup settings. It just says, "Always use this profile: Microsoft Outlook."
>>>>
>>>>So, I would just add This.Session1.UserName = "Microsoft Outlook" before the Signon call? What about other users using this on different computers? Will that still work?
>>>
>>>Yes that would be the right syntax. As for other computers you probably will need to make it a config item in a user table or something like that. As I understand, it is normal to have everyone within an organization using the same profile. I must confess I am not well versed in Outlook, I do know I stumbled on the Profile portion of the MAPI control and added the line above for that reason. FWIW, I don't see you're questions as a "free ride", but I do understand you trying to work it out on your own. For me, that approach seems to stick better.
>>>
>>>HTH
>>
>>I plugged in the call to the profile...
>>
>>
>>ThisForm.Session1.UserName = "Microsoft Outlook"
>>ThisForm.Session1.SignOn
>>
>>
>>... but the mail still didn't automatically send. After I clicked on Send, I immediately got back a message from the mail administrator account stating the same error as before:
>>
>>
>>Your message did not reach some or all of the intended recipients.
>>
>>      Subject:	Change Order CM7893
>>      Sent:	9/7/99 12:00 PM
>>
>>The following recipient(s) could not be reached:
>>
>>      'Chuck Henry' on 9/7/99 12:00 PM
>>            No transport provider was available for delivery to this recipient.
>>
>>
>>Would still appreciate any further suggestions. TIA, Chuck.
>
>Sounds like the Session layer is not working right. If you look at my original code, I test the connection with:
>
>IF This.oSession.SessionID > 0
> This.oMessage.SessionID = This.oSession.SessionID
>ELSE
> * Login failed
> RETURN .F.
>ENDIF
>
>Are you performing any bounds checking to make sure that the Session layer is instanstiated and you get a SessionID after the logon?

Not performing any bounds checking. How would I accomplish that? The funny thing about this is that when I comment out the code to resolve the recipient name...
* Increment the Recipient index
*ThisForm.Message1.RecipIndex = 0
* Set the Recipient Name
*ThisForm.Message1.RecipDisplayName = "CHUCK HENRY"
* Resolve the Recipient Name
*ThisForm.Message1.ResolveName
...and simply pick my name from the Global Address List and then click on Send, the message goes thru just fine -- no errors. This would seem to indicate that I do have a valid session, would it not?
Chuck Henry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform