Solved

Send FROM using OutMail?

Posted on 2008-10-27
4
607 Views
Last Modified: 2012-08-13
Hi,

I am currently using the attached code to send an email via outlook when a button is clciked, however it doesnt recognise the .From field.

Is there a way around this so I can send from a certain mailbox?

Thanks,

Paul.
With OutMail

            .From = "me@email.com"

            .To = DestinationEmail

            .CC = ""

            .BCC = "email@email.com"

            .Subject = "Test Message"

            .Body = strbody

            .htmlbody = strbody

            .send()
 

        End With

Open in new window

0
Comment
Question by:m0tSiE
  • 2
  • 2
4 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 22812129
it is better not to use the Outlook object for many reasons (like you will get a security dialog on the Send method).

have a look at http://www.emoreau.com/Entries/Articles/2007/09/Using-SystemNetMail.aspx to be introduced to the System.Net.Mail namespace
0
 

Author Comment

by:m0tSiE
ID: 22812406
Thanks emoreau,

The problem is that I am sending via an exchange server, therefore I dont have any SMTP details to add.
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 22812863
You can use your Exchange server as your SMTP server
0
 

Author Closing Comment

by:m0tSiE
ID: 31510268
Cheers.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now