473,846 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

programatically sending email

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 them, otherwise please forgive the
crossposting.)

I'm sure I've seen posts here before criticising the practice of automating
outlook for the purpose of programatically sending email, on the grounds that
it's naff. Well now we're really landed in it, it's more than naff. The IT
department have applied some security patch, and it means that a guy in our
department now has to sit there for about 10 minutes constantly clicking
"yes" to the message box that pops up saying "an external program is trying
to use outlook to send email, do you want to allow this?, blah blah blah".
So I desparately NEED to find a way of sending email without using outlook,
and I haven't got the foggiest! I've heard of something called "MIME" - is
this a load of API functions I need to be using?
One other thing - the configuration. It's dead easy to set up outlook in our
network - when loading the profile for the first time, you just tell it the
name of the exchange server to connect to (which we don't have control over)
and it picks it up. Can MIME (if that's the technology I need to be using)
connect to an exchange server?

I'm sure I could understand it once I knew the general structure, so any
links to the basics would be much appreciated, aswell as people's experience
with common pitfalls. No third party controls if possible, as our IT
department have to authorise things like that and they are mightily
suspicious of them.
But it would sure impress people if I could program our way out of this
stupid corner that IT have boxed us into, so any help is much appreciated!

Thanks
Nov 16 '05 #1
17 2913
"Bonj" <Bo**@discussio ns.microsoft.co m> schrieb:
So I desparately NEED to find a way of sending email
without using outlook, and I haven't got the foggiest!
Sending and receiving email
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=email&lang= en>
I've heard of something called "MIME" - is
this a load of API functions I need to be using?


MIME is used for encoding mail attachments, for example.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 16 '05 #2
Bonj,

See inline:

I've heard of something called "MIME" - is
this a load of API functions I need to be using?
MIME is short for Multipurpose Internet Mail Extension (I believe). It
is a way of formatting content in messages, it's not a protocol for sending
them.
One other thing - the configuration. It's dead easy to set up outlook in
our
network - when loading the profile for the first time, you just tell it
the
name of the exchange server to connect to (which we don't have control
over)
and it picks it up. Can MIME (if that's the technology I need to be using)
connect to an exchange server?
If your exchange server supports the IMAP or POP3 protocols, I would
suggest looking at the Indy Project:

http://www.indyproject.org

It has a number of classes that you can use to send/receive mail. The
thing is, it won't connect to Exchange directly, so you will have to connect
through the POP3 or IMAP connector.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
I'm sure I could understand it once I knew the general structure, so any
links to the basics would be much appreciated, aswell as people's
experience
with common pitfalls. No third party controls if possible, as our IT
department have to authorise things like that and they are mightily
suspicious of them.
But it would sure impress people if I could program our way out of this
stupid corner that IT have boxed us into, so any help is much appreciated!

Thanks

Nov 16 '05 #3
Bonj
To avoid the Outlook security prompts its generally easiest to create a
properly constructed COM-Addin for Outlook 2003. There are other methods
available for other versions of Outlook...

See:
http://msdn.microsoft.com/library/de...scomaddins.asp

Further info can be found at:
http://www.slipstick.com/dev/ol2003problems.htm
http://www.slipstick.com/outlook/esecup/admin.htm

Hope this helps
Jay
"Bonj" <Bo**@discussio ns.microsoft.co m> wrote in message
news:A3******** *************** ***********@mic rosoft.com...
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 them, otherwise please forgive the
crossposting.)

I'm sure I've seen posts here before criticising the practice of
automating
outlook for the purpose of programatically sending email, on the grounds
that
it's naff. Well now we're really landed in it, it's more than naff. The IT
department have applied some security patch, and it means that a guy in
our
department now has to sit there for about 10 minutes constantly clicking
"yes" to the message box that pops up saying "an external program is
trying
to use outlook to send email, do you want to allow this?, blah blah blah".
So I desparately NEED to find a way of sending email without using
outlook,
and I haven't got the foggiest! I've heard of something called "MIME" - is
this a load of API functions I need to be using?
One other thing - the configuration. It's dead easy to set up outlook in
our
network - when loading the profile for the first time, you just tell it
the
name of the exchange server to connect to (which we don't have control
over)
and it picks it up. Can MIME (if that's the technology I need to be using)
connect to an exchange server?

I'm sure I could understand it once I knew the general structure, so any
links to the basics would be much appreciated, aswell as people's
experience
with common pitfalls. No third party controls if possible, as our IT
department have to authorise things like that and they are mightily
suspicious of them.
But it would sure impress people if I could program our way out of this
stupid corner that IT have boxed us into, so any help is much appreciated!

Thanks

Nov 16 '05 #4

"Bonj" <Bo**@discussio ns.microsoft.co m> wrote in message
news:A3******** *************** ***********@mic rosoft.com...
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 them, otherwise please forgive the
crossposting.)

I'm sure I've seen posts here before criticising the practice of automating outlook for the purpose of programatically sending email, on the grounds that it's naff. Well now we're really landed in it, it's more than naff. The IT
department have applied some security patch, and it means that a guy in our department now has to sit there for about 10 minutes constantly clicking
"yes" to the message box that pops up saying "an external program is trying to use outlook to send email, do you want to allow this?, blah blah blah".
So I desparately NEED to find a way of sending email without using outlook, and I haven't got the foggiest! I've heard of something called "MIME" - is
this a load of API functions I need to be using?
One other thing - the configuration. It's dead easy to set up outlook in our network - when loading the profile for the first time, you just tell it the name of the exchange server to connect to (which we don't have control over) and it picks it up. Can MIME (if that's the technology I need to be using)
connect to an exchange server?

I'm sure I could understand it once I knew the general structure, so any
links to the basics would be much appreciated, aswell as people's experience with common pitfalls. No third party controls if possible, as our IT
department have to authorise things like that and they are mightily
suspicious of them.
But it would sure impress people if I could program our way out of this
stupid corner that IT have boxed us into, so any help is much appreciated!

Thanks


I would ask the IT department how to deal with the problem since THEY are
causing it and preventing YOU from doing your job.
Why should you (and your department) have to spent time (and hence money)
because another department is imposing it's own rules.
The IT department is suppose to help its users, not hinder them!!

John..
Nov 16 '05 #5
Nicholas Paldino [.NET/C# MVP] wrote:

It has a number of classes that you can use to send/receive mail. The
thing is, it won't connect to Exchange directly, so you will have to connect
through the POP3 or IMAP connector.

POP3 and IMAP are protocols for receiving mail,
I don't think they'd be much help with sending.

Bob
--
Nov 16 '05 #6
"Nospam" <no****@please. co.uk> wrote in message
news:41******** *************** @news.easynet.c o.uk...

"Bonj" <Bo**@discussio ns.microsoft.co m> wrote in message
news:A3******** *************** ***********@mic rosoft.com...
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 them, otherwise please forgive the
crossposting.)

I'm sure I've seen posts here before criticising the practice of

automating
outlook for the purpose of programatically sending email, on the grounds

that
it's naff. Well now we're really landed in it, it's more than naff. The IT department have applied some security patch, and it means that a guy in

our
department now has to sit there for about 10 minutes constantly clicking
"yes" to the message box that pops up saying "an external program is

trying
to use outlook to send email, do you want to allow this?, blah blah blah". So I desparately NEED to find a way of sending email without using

outlook,
and I haven't got the foggiest! I've heard of something called "MIME" - is this a load of API functions I need to be using?
One other thing - the configuration. It's dead easy to set up outlook in

our
network - when loading the profile for the first time, you just tell it

the
name of the exchange server to connect to (which we don't have control

over)
and it picks it up. Can MIME (if that's the technology I need to be using) connect to an exchange server?

I'm sure I could understand it once I knew the general structure, so any
links to the basics would be much appreciated, aswell as people's

experience
with common pitfalls. No third party controls if possible, as our IT
department have to authorise things like that and they are mightily
suspicious of them.
But it would sure impress people if I could program our way out of this
stupid corner that IT have boxed us into, so any help is much appreciated!
Thanks


I would ask the IT department how to deal with the problem since THEY are
causing it and preventing YOU from doing your job.
Why should you (and your department) have to spent time (and hence money)
because another department is imposing it's own rules.
The IT department is suppose to help its users, not hinder them!!

John..


The box that is a problem is a "feature" Microsoft added to later versions
of Outlook 2000 security patches. This anonying feature was implimented to
prevent script based virii from mass mailing.

While I can say that the box is anonying, I'd much rather deal with it then
leave a system open to virus attacks since it's not properly maintained.

Here is the response I sent to Terry Holland about this very subject earlier
today:

The first option that comes to mind is for you to use CDO to directly access
Outlook and avoid the nice interface you are using. Note that CDO is a pain
to code in. The another option is to use a program called Outlook
Redemption (http://www.dimastr.com/redemption/), using this will allow you
to use the code you have already written with very few changes. I used it a
few years ago and it wasn't too expensive, had a lenient license, and the
creator was very helpful and quick at responding to questions. The final
option is to access the popup box from VB and sendkey commands to it to
automatically close it.

Outlook Redemption is really the best solution in my eyes; however, you
could use SendKeys. It's messing and definately not proper coding in my
eyes, but it will get the job none without a 3rd party program.
Nov 16 '05 #7
Paul,
The first option that comes to mind is for you to use CDO to directly
access
Outlook and avoid the nice interface you are using. Note that CDO is a
pain
to code in. The another option is to use a program called Outlook
Redemption (http://www.dimastr.com/redemption/), using this will allow you Note: CDO 1.2.1 that ships with current versions of Outlook has the same
security feature.

Hope this helps
Jay

"Paul Bobrowski" <no****@msdiscu ssion.com> wrote in message
news:Ox******** ********@TK2MSF TNGP14.phx.gbl. .. "Nospam" <no****@please. co.uk> wrote in message
news:41******** *************** @news.easynet.c o.uk...

"Bonj" <Bo**@discussio ns.microsoft.co m> wrote in message
news:A3******** *************** ***********@mic rosoft.com...
> 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 them, otherwise please forgive the
> crossposting.)
>
> I'm sure I've seen posts here before criticising the practice of

automating
> outlook for the purpose of programatically sending email, on the
> grounds

that
> it's naff. Well now we're really landed in it, it's more than naff. The IT > department have applied some security patch, and it means that a guy in

our
> department now has to sit there for about 10 minutes constantly
> clicking
> "yes" to the message box that pops up saying "an external program is

trying
> to use outlook to send email, do you want to allow this?, blah blah blah". > So I desparately NEED to find a way of sending email without using

outlook,
> and I haven't got the foggiest! I've heard of something called "MIME" - is > this a load of API functions I need to be using?
> One other thing - the configuration. It's dead easy to set up outlook
> in

our
> network - when loading the profile for the first time, you just tell it

the
> name of the exchange server to connect to (which we don't have control

over)
> and it picks it up. Can MIME (if that's the technology I need to be using) > connect to an exchange server?
>
> I'm sure I could understand it once I knew the general structure, so
> any
> links to the basics would be much appreciated, aswell as people's

experience
> with common pitfalls. No third party controls if possible, as our IT
> department have to authorise things like that and they are mightily
> suspicious of them.
> But it would sure impress people if I could program our way out of this
> stupid corner that IT have boxed us into, so any help is much appreciated! >
> Thanks


I would ask the IT department how to deal with the problem since THEY are
causing it and preventing YOU from doing your job.
Why should you (and your department) have to spent time (and hence money)
because another department is imposing it's own rules.
The IT department is suppose to help its users, not hinder them!!

John..


The box that is a problem is a "feature" Microsoft added to later versions
of Outlook 2000 security patches. This anonying feature was implimented
to
prevent script based virii from mass mailing.

While I can say that the box is anonying, I'd much rather deal with it
then
leave a system open to virus attacks since it's not properly maintained.

Here is the response I sent to Terry Holland about this very subject
earlier
today:

The first option that comes to mind is for you to use CDO to directly
access
Outlook and avoid the nice interface you are using. Note that CDO is a
pain
to code in. The another option is to use a program called Outlook
Redemption (http://www.dimastr.com/redemption/), using this will allow you
to use the code you have already written with very few changes. I used it
a
few years ago and it wasn't too expensive, had a lenient license, and the
creator was very helpful and quick at responding to questions. The final
option is to access the popup box from VB and sendkey commands to it to
automatically close it.

Outlook Redemption is really the best solution in my eyes; however, you
could use SendKeys. It's messing and definately not proper coding in my
eyes, but it will get the job none without a 3rd party program.

Nov 16 '05 #8
It also supports SMTP, I think that was what I was going for.

Thanks for the correction.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Bob O`Bob" <fi*******@yaho ogroups.com> wrote in message
news:u5******** ******@TK2MSFTN GP10.phx.gbl...
Nicholas Paldino [.NET/C# MVP] wrote:

It has a number of classes that you can use to send/receive mail.
The thing is, it won't connect to Exchange directly, so you will have to
connect through the POP3 or IMAP connector.

POP3 and IMAP are protocols for receiving mail,
I don't think they'd be much help with sending.

Bob
--

Nov 16 '05 #9
Thanks a lot all...I'll check out some of the links and see if anything can
be done.
I think I meant "MAPI", not "MIME" - picked the wrong acronym, sorry! I'm
not actually at all interested in encoding any mail...
"Bonj" <Bo**@discussio ns.microsoft.co m> wrote in message
news:A3******** *************** ***********@mic rosoft.com...
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 them, otherwise please forgive the
crossposting.)

I'm sure I've seen posts here before criticising the practice of
automating
outlook for the purpose of programatically sending email, on the grounds
that
it's naff. Well now we're really landed in it, it's more than naff. The IT
department have applied some security patch, and it means that a guy in
our
department now has to sit there for about 10 minutes constantly clicking
"yes" to the message box that pops up saying "an external program is
trying
to use outlook to send email, do you want to allow this?, blah blah blah".
So I desparately NEED to find a way of sending email without using
outlook,
and I haven't got the foggiest! I've heard of something called "MIME" - is
this a load of API functions I need to be using?
One other thing - the configuration. It's dead easy to set up outlook in
our
network - when loading the profile for the first time, you just tell it
the
name of the exchange server to connect to (which we don't have control
over)
and it picks it up. Can MIME (if that's the technology I need to be using)
connect to an exchange server?

I'm sure I could understand it once I knew the general structure, so any
links to the basics would be much appreciated, aswell as people's
experience
with common pitfalls. No third party controls if possible, as our IT
department have to authorise things like that and they are mightily
suspicious of them.
But it would sure impress people if I could program our way out of this
stupid corner that IT have boxed us into, so any help is much appreciated!

Thanks

Nov 16 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
7057
by: Paul Lamonby | last post by:
Hi, I am sending a file from the server as an email attachment. The file is being attached no problem and sending the email, but I get an error when I try to open it saying it is corrupt. Obviuosly, the file is fine on the server, so the attachment code I am using must be corrupting it, but I dont know what it is: // send email with attachment function emailAttachment($to, $subject, $message, $name, $email,
13
3235
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 this, it seems, that the user must install IIS on their computer. Isn't there a class that will detect whatever mail server is available on a computer and use that? How do I create this functionality without having the user add any other...
17
1326
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 them, otherwise please forgive the crossposting.) I'm sure I've seen posts here before criticising the practice of automating outlook for the purpose of programatically sending email, on the grounds that it's naff. Well now we're really landed in...
31
12741
by: happyse27 | last post by:
Hi All, I am trying for weeks how to send email from windows pc, which from my gmail account to my hotmail account. Using net::smtp module sending email failed,Kindly assist. (for the item d it is working for normal email servers, but NOT with gmail server, I am very puzzled still!!) Codes(item c below) It keeps complaining and logs and codes are below. a) apache access logs --------------------------------- 127.0.0.1 - - "GET...
6
9209
by: Chocolade | last post by:
Hi, Im using System.Net.Mail to send email in my application it was working great without any problems untill this morning after like 20-30 tries it was sending the email ok then suddenly this morning i got an exception and i cant figure out what/where the problem is and how to fix it. The problem say i have some invalid char: invalid character was found in the mail header: 'י'. Now this char 'י' is an hebrew letter. But i searched...
0
9879
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9727
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10705
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10330
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9477
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7050
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4113
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3158
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.