473,386 Members | 1,835 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,386 software developers and data experts.

sending mail

how to send email by MS outlook express using C# code
Nov 16 '05 #1
7 4681
I have an example using the default email client on my web site if this is
any help to you.

using System.Diagnostics;

string toEmail = "de**@publicjoe.co.uk";
string subject = "Love the Program";
string body = "Thanks a lot";
string message = string.Format( "mailto:{0}?subject={1}&body={2}", toEmail,
subject, body );

Process.Start( message );

Example app can be found at
http://www.publicjoe.f9.co.uk/csharp/snip/snip007.html

Hope this helps

Publicjoe
C# Tutorial at http://www.publicjoe.f9.co.uk/csharp/tut.html
C# Snippets at http://www.publicjoe.f9.co.uk/csharp/snip/snippets.html
C# Ebook at http://www.publicjoe.f9.co.uk/csharp/samples/ebook.html

"mostafa atalla" <mo***********@discussions.microsoft.com> wrote in message
news:48**********************************@microsof t.com...
how to send email by MS outlook express using C# code

Nov 16 '05 #2
But this way the is not sent. It just open the mail editor with the correct
data, but the user still need to to do the sending.

How can I to the sending by C# code without bothering the user?
Thanks
Sharon
Nov 17 '05 #3
System.Web.Mail.SmtpMail

"Sharon" <Sh****@discussions.microsoft.com> wrote in message
news:ED**********************************@microsof t.com...
But this way the is not sent. It just open the mail editor with the
correct
data, but the user still need to to do the sending.

How can I to the sending by C# code without bothering the user?
Thanks
Sharon

Nov 17 '05 #4
Yes, I know the System.Web.Mail.SmtpMail and I'm using it.
But it require using a specific mail server that require authentication,
that require user name and password that can be easily seen by looking in the
assembly, so it require encrypting the user name name and password etc.

This is why I wish to send the mail using the current default email client.

How can that be done?

--------
Thanks
Sharon
Nov 17 '05 #5
Take a look at MAPI.

An example of using Simple MAPI can be found here:
http://www.codeproject.com/csharp/simplemapidotnet.asp
HTH
BW

Sharon wrote:
Yes, I know the System.Web.Mail.SmtpMail and I'm using it.
But it require using a specific mail server that require
authentication, that require user name and password that can be
easily seen by looking in the assembly, so it require encrypting the
user name name and password etc.

This is why I wish to send the mail using the current default email
client.

How can that be done?

--------
Thanks
Sharon

Nov 17 '05 #6
Yes, It a nice example, although it can done more easily by
System.Web.Mail.SmtpMail.

But the trouble is that this sample also involve the user.
It causes the Outlook to popup a verification dialog asking the user to
allow the mail sending.

I I want to avoid any user disturbance.

Can it be done?
---------
Thanks
Sharon
Nov 17 '05 #7
Well your last post contained the statement

//
This is why I wish to send the mail using the current default email
client.
\\

To do that you use MAPI, to avoid the user intervention in MAPI you
will have change the security settings on the users machine.

Now, to use authenticateion with SmtpMail check out this page:
http://www.systemwebmail.com/faq/3.8.aspx

It is really very simple, and simple typing "SmtpMail Authenticate"
(without the quotes) into Google brings up many
discussions/articles/examples on the subject.
HTH
BW
Sharon wrote:
Yes, It a nice example, although it can done more easily by
System.Web.Mail.SmtpMail.

But the trouble is that this sample also involve the user.
It causes the Outlook to popup a verification dialog asking the user
to allow the mail sending.

I I want to avoid any user disturbance.

Can it be done?
---------
Thanks
Sharon

Nov 17 '05 #8

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

Similar topics

0
by: praba kar | last post by:
Dear All, I have doubt regarding mail sending smtplib module. The below code is I used to send a mail. ########################################## import email.Message import email.Utils...
10
by: Stuart Mueller | last post by:
I have an exchange server, that I sometimes use to perform mail shots to clients on our database, these can be upwards of 1000 at a time. As we don't want different clients to see who we are...
2
by: Mr. x | last post by:
Hello, I am sending emails with Hebrew contents. When receiving emails - I cannot see the Hebrew characters (it is not outlook express configuration, because when receiving emails from friends -...
3
by: VB Programmer | last post by:
I have an ASPX page where I send out emails through my mail server mail.MyDomain.com. When I send emails to MyName@MyDomain.com it sends PERFECTLY. When I try sending an email to any other address...
3
by: HoustonComputerGuy | last post by:
I am working on getting my web applications moved to .Net 2.0 and am having some problems with System.Net.Mail. I get the following error when sending the mail: System.Net.Mail.SmtpException was...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
2
by: HK | last post by:
In VB.NET, I'm getting the exception "failure sending mail". I'm running VS 2005 on XP Home. This is a new install on a new PC. I've never had email problems with VS 2003, and there I could...
3
by: mfleet1973 | last post by:
Hello Again. I have a program that sends e-mails as follows: Try Dim mail As New MailMessage mail.To = "me@comp.com" mail.From = "me@comp.com mail.Subject = "Test" mail.Body = "Testing123"
9
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient...
4
by: =?Utf-8?B?R3V5IENvaGVu?= | last post by:
Hi all I use: Dim message As New MailMessage(txtTo.Text, txtFrom.Text, txtSubject.Text, txtBody.Text) Dim emailClient As New SmtpClient(txtSMTPServer.Text) emailClient.Send(message) And its...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.