|
|
Outlook.Application Mail versenden- #24060 in section [742560] |
Sec: |
(1) Allgemeines |
Von: |
Harro Schippan |
An: |
All |
Am/Um: |
13.02.2020 17:16:00 gelesen |
Hallo, ich habe mehrere Accounts in Outlook. Beim Versenden von Mails per VFP möchte ich als SendUsingAccount nur eine bestimmte Adresse verwenden. Habe diesen Code gefunden. Es wird immer die gleiche SendeAdresse verwendet. "lomail.SendUsingAccount" ist immer NULL Kann jemand helfen? Gruß Harro **************************************************************************** * EMail PUBLIC goApp PUBLIC oAccount As Outlook.account goApp = CREATEOBJECT("Outlook.Application") FOR EACH oAccount In goApp.Application.Session.Accounts ? oAccount.SmtpAddress loMail = goApp.createitem(0) loMail.subject = "hier der Betreff für Account: "+ oAccount.SmtpAddress loMail.TO = "Onkel-Otto@t-online.de" loMail.Recipients.Add ("someone@example.com") loMail.Recipients.ResolveAll loMail.BODY = "huhu hier ist Text" lomail.SendUsingAccount = oAccount loMail.DISPLAY() *loMail.send() ENDFOR goApp = .NULL. **************************************************************************** Hier habe ich den Code her: https://stackoverflow.com/questions/29293860/send-email-using-php-from-outlook-com-component-using-particular-account/29295368#29295368
|
|
|
|