PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Outlook Redemption - how to send email on someone behalf
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Outlook Redemption - how to send email on someone behalf
![]() |
Outlook Redemption - how to send email on someone behalf |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi all,
I tried to send the email on someone behalf, but its keep send email from my account. On my computer, I created two profile "KIM","JACK". I got both permission on these two profile. When I opened Outlook for "KIM" account, and i tried to send email on behalf of JACK, its keep send the email from "KIM" profile instead of "JACK" profile. But if i close the OUTLOOK then it send email correctly i.e from JACK profile.... I used "LOGON" function to logon JACK profile with NewSession... Is is the right function to send email on someone behalf? also where can i find thHi all, I tried to send the email on someone behalf, but its keep send email from my account. On my computer, I created two profiles "KIM","JACK". I got both permission on these two profiles. When I opened Outlook for "KIM" account, and I tried to send email on behalf of JACK, its keep send the email from "KIM" profile instead of "JACK" profile. But if I close the OUTLOOK then it send email correctly i.e. from JACK profile.... I used "LOGON" function to logon JACK profile with NewSession... Is it the right function to send email on someone behalf? Also where can I find the Outlook Redemption Object Manual? This is a completed coding: Dim olApp As Outlook.Application Dim olMailItemObject As Outlook.MailItem Dim SafeMailItem As Redemption.SafeMailItem Set olApp = CreateObject("Outlook.application") Set NS = olApp.GetNamespace("MAPI") NS.Logon Profile:="JACK", NewSession:=True Set olMailItemObject = olApp.CreateItem(olMailItem) Set SafeMailItem = CreateObject("Redemption.SafeMailItem") SafeMailItem.Item = olMailItemObject SafeMailItem.Body = "test body" SafeMailItem.Subject = "test" SafeMailItem.Recipients.Add "KIM" SafeMailItem.Recipients.ResolveAll SafeMailItem.Send Set olMailItemObject = Nothing Set SafeMailItem = Nothing Set olApp = Nothing Set NS = Nothing Any help will be really appreciated, Thank, Kim, |
|
|
|
#2 |
|
Guest
Posts: n/a
|
In case of Exchange, use MailItem.SentOnBehalfOfName property. In case of
SMTP, see http://www.dimastr.com/redemption/faq.htm#14 Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "kim" <kct@emia.com.au> wrote in message news:5c2c58b.0402172234.718ef549@posting.google.com... > Hi all, > > I tried to send the email on someone behalf, but its keep send email > from my account. On my computer, I created two profile "KIM","JACK". I > got both permission on these two profile. When I opened Outlook for > "KIM" account, and i tried to send email on behalf of JACK, its keep > send the email from "KIM" profile instead of "JACK" profile. But if i > close the OUTLOOK then it send email correctly i.e from JACK > profile.... I used "LOGON" function to logon JACK profile with > NewSession... Is is the right function to send email on someone > behalf? also where can i find thHi all, > > I tried to send the email on someone behalf, but its keep send email > from my account. On my computer, I created two profiles "KIM","JACK". > I got both permission on these two profiles. When I opened Outlook for > "KIM" account, and I tried to send email on behalf of JACK, its keep > send the email from "KIM" profile instead of "JACK" profile. But if I > close the OUTLOOK then it send email correctly i.e. from JACK > profile.... I used "LOGON" function to logon JACK profile with > NewSession... Is it the right function to send email on someone > behalf? Also where can I find the Outlook Redemption Object Manual? > > > This is a completed coding: > > Dim olApp As Outlook.Application > Dim olMailItemObject As Outlook.MailItem > Dim SafeMailItem As Redemption.SafeMailItem > > Set olApp = CreateObject("Outlook.application") > Set NS = olApp.GetNamespace("MAPI") > > NS.Logon Profile:="JACK", NewSession:=True > > Set olMailItemObject = olApp.CreateItem(olMailItem) > Set SafeMailItem = CreateObject("Redemption.SafeMailItem") > SafeMailItem.Item = olMailItemObject > SafeMailItem.Body = "test body" > SafeMailItem.Subject = "test" > SafeMailItem.Recipients.Add "KIM" > > SafeMailItem.Recipients.ResolveAll > SafeMailItem.Send > > Set olMailItemObject = Nothing > Set SafeMailItem = Nothing > Set olApp = Nothing > Set NS = Nothing > > > Any help will be really appreciated, > Thank, > Kim, |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

