EDN Admin
Well-known member
Hi, Hope you can help.
I am using this code to fire off an Email in Outlook.
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; Dim oOutL <span style="color:Blue; As <span style="color:Blue; New Outlook.Application
<span style="color:Blue; Dim oMail <span style="color:Blue; As Outlook.MailItem
oMail = oOutL.CreateItem(Outlook.OlItemType.olMailItem)
oMail.UnRead = <span style="color:Blue; True
oMail.<span style="color:Blue; To = <span style="color:#A31515; "me.here@live.no"
oMail.Subject = <span style="color:#A31515; "TEST AUTOMATED EMAIL"
oMail.HTMLBody = <span style="color:Blue; True
oMail.Body = <span style="color:#A31515; "This is a test Email"
<span style="color:Green; oMail.Attachments.Add("attachement.html")
oMail.Send()
[/code]
It works well, but there is a slight problem.
In Outlook i have 4 accounts.
My Default account called "MyLiveAccount" and it is a Mapi Windows Live account using the Outlook connector. IT IS DEFINATELY DEFAULT.
2nd account "Blueyonder1" pop3 account. Just using it to pick up any messages sent. SMTP doesnt work now as its an old account but i still get some mails.
3rd account "Blueyonder2" and the same as above.
4th account "Blueyonder3" and the same as above.
Now when the Email is generated it sits in the Outbox and wont go anywhere as the SMTP login no longer works on "Blueyonder1" that it is trying to use. Why it isnt going through the default Email account i am unsure. Perhaps its because the default
is Mapi and the Blueyonder accounts are all pop3 and its choosing the first Pop account, but like i said, i am unsure.
So i have to go to the mail and just change the account myself to "MyLiveAccount" and press send. Off it goes no problem. It is just a pain to do everytime.
I have researched that you can specify an account to send it through, but cant seem to make it work, i was wondering if anyone can have a look and let me know how i can amend the above working code to include setting the account to use to "MyLiveAccount".
Many thanks
View the full article
I am using this code to fire off an Email in Outlook.
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; Dim oOutL <span style="color:Blue; As <span style="color:Blue; New Outlook.Application
<span style="color:Blue; Dim oMail <span style="color:Blue; As Outlook.MailItem
oMail = oOutL.CreateItem(Outlook.OlItemType.olMailItem)
oMail.UnRead = <span style="color:Blue; True
oMail.<span style="color:Blue; To = <span style="color:#A31515; "me.here@live.no"
oMail.Subject = <span style="color:#A31515; "TEST AUTOMATED EMAIL"
oMail.HTMLBody = <span style="color:Blue; True
oMail.Body = <span style="color:#A31515; "This is a test Email"
<span style="color:Green; oMail.Attachments.Add("attachement.html")
oMail.Send()
[/code]
It works well, but there is a slight problem.
In Outlook i have 4 accounts.
My Default account called "MyLiveAccount" and it is a Mapi Windows Live account using the Outlook connector. IT IS DEFINATELY DEFAULT.
2nd account "Blueyonder1" pop3 account. Just using it to pick up any messages sent. SMTP doesnt work now as its an old account but i still get some mails.
3rd account "Blueyonder2" and the same as above.
4th account "Blueyonder3" and the same as above.
Now when the Email is generated it sits in the Outbox and wont go anywhere as the SMTP login no longer works on "Blueyonder1" that it is trying to use. Why it isnt going through the default Email account i am unsure. Perhaps its because the default
is Mapi and the Blueyonder accounts are all pop3 and its choosing the first Pop account, but like i said, i am unsure.
So i have to go to the mail and just change the account myself to "MyLiveAccount" and press send. Off it goes no problem. It is just a pain to do everytime.
I have researched that you can specify an account to send it through, but cant seem to make it work, i was wondering if anyone can have a look and let me know how i can amend the above working code to include setting the account to use to "MyLiveAccount".
Many thanks
View the full article