473,395 Members | 1,556 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

automate email sending via outlook

i have coded a little windows application in vb.net, which looks up a lot of info from an excel sheet, defines and fills new outlook.mailitem:s with information and attempts to send them. but for each mail that is to be sent, i get a message from outlook saying "A program is trying to send emails on your behalf. Do you want to allow this? If this is unexpected it might be a virus and you should choose No." I have to wait a couple of seconds and then click "Yes" for each popup - which might be hundreds depending on the excel sheet.

Is there any way to get around this? I need it to be something that's pretty simple for the user of my application to do, like an easy-accessible setting in Outlook, or (even better) some code that allows me to do this. The main concern is to be able to automatically send batches of emails.

Any suggestions or workarounds?

PS. I know this sounds like I'm trying to spam half the world, but the program is for sending out monthly reports to my company's customers. They pay to receive these mails ;)
Jan 28 '08 #1
3 2170
hi again,

i found this thread: http://www.thescripts.com/forum/thread764272.html

in there there's source code for a "killer" class, which starts a separate thread to kill dialog boxes. it works excellent for the dialog that asks for permission to access outlook functions, but i can't get it to kill the little dialog for the actual sending operation - i assume this is because the dialog box has a five second delay before you can actually press the buttons...

does anyone know a way around this?
Feb 5 '08 #2
BlackMustard,

I have this exact same issue and scenario. I too read an input file filled with email and customer information. My problem is that I can't seem to assign the "SenderEmailAddress" property with a value (an email address contained in the file) as it is a "Read Only" property. Did you ever get this resolved.

Thanks,

Blake
Dec 15 '08 #3
Hi Blake,

No, I actually never got this issue resolved as in working exactly the way I wanted it. Instead I ended up writing a little .Net executable that called some Outlook API:s to just open the emails for viewing, and then my colleague had to click "send" individually for each email. This took a while - some half hour at most, but compared to the full day it could take to manually generate the emails, add attachments etc, this saved a lot of time. And besides, she wanted to review every email before sending it anyway =). Unfortunately I left my position at that company six months ago, so I don't have any of the source code available and I cannot remember exactly how it worked.

As far as changing the SenderEmailAddress, however, I don't think it can be done. I can think of only one possibility (if it is possible at all) to do so, namely when the email object is created. Look in the documentation for a constructor method of the Outlook.MailItem class that takes the senders address as a parameter (press F2 to open the Object Viewer in the VBA Editor).

An alternative that I remember I used, and that works fine, is to change the SendOnBehalfOfName (or whatever the property was called - again, check with the documentation). This will make the email sender field hold something like "Blake McKenna on behalf of YourCompany Customer Services", and it will be sorted under "YourCompany Customer Services" in the folder views in Outlook. Just make sure that the user who's logged in has authority to send emails on behalf of that account (those settings are changed within the account you want to send on behalf of).

I hope this helps - as I said, I have left the company and all the scripts behind me, so I have only my memory to rely on.

Regards,

Tomas
Dec 15 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: Sven Templin | last post by:
Hello all, our configuration is as following described: - OS: Windows 2000 - Apache server 1.3 - Php 3.8 - MS outlook client 2000 _and_ no SMTP server available in the whole intranet.
13
by: joe215 | last post by:
I want my users to send emails from a Windows app that I am developing in Visual Basic.NET 2003. I found a good example of sending email to a SMTP server using the SmtpMail class. However, using...
1
by: Devonish | last post by:
I am composing an email with Access VB and then sending it from within Access. Everything works correctly (the email actually goes!) but Outlook ask some irritating questions that the user is...
3
by: scott_baird | last post by:
I have an email macro setup (maybe I should go another way, but that was the quickest at the moment...) and what I would like to do is automate the "to" addressee of the email it generates for...
17
by: Bonj | last post by:
Right guys. (I would like a solution to this in VB6 as this is what our needy app is written in, but any solutions that involve .NET would be much appreciated likewise as I could instantiate...
5
by: TM | last post by:
I would like to write a little app in Visual Basic .net as an add-in to Outlook 2003 so that I can quickly get a list of contact names and email addresses, then when I click on a name or email...
6
by: Tim Marshall | last post by:
I am having one HELL of a time with sending pdfs that I generate. Outlook is not my preferred mail client but I have the wrethced thing installed so that I can use some late binding technique I...
3
by: chiinook | last post by:
I have built a fairly simple database to manage contact information for about 300 clients. Some of these have requested that I send them our publications by email rather than post. I have created a...
1
by: sxwend | last post by:
I am trying to use the following post results (http://www.thescripts.com/forum/thread189759.html) and add another requirement. I need to send the results to just the email addresses that the query...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.