Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Send FROM using OutMail?

Posted on 2008-10-27
4
Medium Priority
?
613 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 70

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 70

Accepted Solution

by:
Éric Moreau earned 2000 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

730 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