PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Outlook Redemption - how to send email on someone behalf

Reply

Outlook Redemption - how to send email on someone behalf

 
Thread Tools Rate Thread
Old 18-02-2004, 06:34 AM   #1
kim
Guest
 
Posts: n/a
Default Outlook Redemption - how to send email on someone behalf


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,
  Reply With Quote
Old 18-02-2004, 04:47 PM   #2
Dmitry Streblechenko \(MVP\)
Guest
 
Posts: n/a
Default Re: Outlook Redemption - how to send email on someone behalf

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,



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off