![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I am using OLE to call outlook in my app to send email. I see many
properties I can set, but not one that I can use to set the account (e.g., send via , or send via , etc.) that will be used to send the email. I have 2 accounts set up in outlook now that I could access. Can anyone help on how outlook sets this account and how I would do it programmatically before I send the email? Many thanks for any ideas on this, Mark |
#2
|
|||
|
|||
![]()
1. OOM in Outlook 2007 - MailItem.SendUsingAccount property
2. Extended MAPI (C++/Delphi only) - use IOlkAccountMgr to read the account names/ids and set them on the message (look at a message with an account info set using OutlookSpy - click IMessage) 3. plug RDOMail.Account property - see http://www.dimastr.com/redemption/rdo/RDOMail.htm /plug Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Markus" wrote in message ... I am using OLE to call outlook in my app to send email. I see many properties I can set, but not one that I can use to set the account (e.g., send via , or send via , etc.) that will be used to send the email. I have 2 accounts set up in outlook now that I could access. Can anyone help on how outlook sets this account and how I would do it programmatically before I send the email? Many thanks for any ideas on this, Mark |
#3
|
|||
|
|||
![]()
Following along this logic, is there a way to use MailItem.SendUsingAccount
that will attempt to send the email via one account, but if that fails, to use a second account that is set up in Outlook? I currently have two accounts, one which works when I have my laptop at work (through one SMTP server) and one which works at home (through a different SMTP server). I am trying to avoid having to manually select the account every time I am at the non-default account location. Thanks for any assistance you can provide. Jason "Dmitry Streblechenko" wrote: 1. OOM in Outlook 2007 - MailItem.SendUsingAccount property 2. Extended MAPI (C++/Delphi only) - use IOlkAccountMgr to read the account names/ids and set them on the message (look at a message with an account info set using OutlookSpy - click IMessage) 3. plug RDOMail.Account property - see http://www.dimastr.com/redemption/rdo/RDOMail.htm /plug Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Markus" wrote in message ... I am using OLE to call outlook in my app to send email. I see many properties I can set, but not one that I can use to set the account (e.g., send via , or send via , etc.) that will be used to send the email. I have 2 accounts set up in outlook now that I could access. Can anyone help on how outlook sets this account and how I would do it programmatically before I send the email? Many thanks for any ideas on this, Mark |
#4
|
|||
|
|||
![]()
HI JHoep,
Following along this logic, is there a way to use MailItem.SendUsingAccount that will attempt to send the email via one account, but if that fails, to use a second account that is set up in Outlook? I guess the problem is that using the wrong account does not result in a failure but will just keep the mail in the outbox until the smtp server gets available, correct? I currently have two accounts, one which works when I have my laptop at work (through one SMTP server) and one which works at home (through a different SMTP server). I am trying to avoid having to manually select the account every time I am at the non-default account location. You might need to check the availability of some other resource, e.g. a file on a network share which is only available when you are in your work network. That should help to figure out which account to use. -- SvenC |
#5
|
|||
|
|||
![]()
Ok, I definitely can check for the existence of a network drive or other
shared file that would be accessible only at work. But how do I do that? What would be the basic commands/syntax to have Outlook do the check and then pick the account to send the email from (ideally this happens behind the scenes when the "Send" button is pressed). Thanks. Jason "SvenC" wrote: HI JHoep, Following along this logic, is there a way to use MailItem.SendUsingAccount that will attempt to send the email via one account, but if that fails, to use a second account that is set up in Outlook? I guess the problem is that using the wrong account does not result in a failure but will just keep the mail in the outbox until the smtp server gets available, correct? I currently have two accounts, one which works when I have my laptop at work (through one SMTP server) and one which works at home (through a different SMTP server). I am trying to avoid having to manually select the account every time I am at the non-default account location. You might need to check the availability of some other resource, e.g. a file on a network share which is only available when you are in your work network. That should help to figure out which account to use. -- SvenC |
#6
|
|||
|
|||
![]()
Hi JHoep,
Ok, I definitely can check for the existence of a network drive or other shared file that would be accessible only at work. But how do I do that? What would be the basic commands/syntax to have Outlook do the check and then pick the account to send the email from (ideally this happens behind the scenes when the "Send" button is pressed). I thought you wanted to do some macro programming. When you want Outlook to automatically choose the accout you could add some code in the ItemSend event of Outlook.Application. I am not sure if you can change the account at this point but you can at least try it. -- SvenC |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting email account in Outlook Express | Jerry the German | Outlook Express | 5 | April 11th 07 03:37 PM |
Setting up email account on laptop | kate_exchange_novice | Outlook - Installation | 1 | December 27th 06 05:25 PM |
Email account not showing up in outgoing email | Larry S. | Outlook Express | 3 | August 3rd 06 08:51 PM |
Setting up Netscape as Outlook email account? | Gordon | Outlook - General Queries | 1 | May 11th 06 05:38 PM |