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

Email out of C#

Hi ,
I want to sent an Email out of an C# Programm.
I am using this code :

private void button3_Click(object sender, System.EventArgs e)

{

MailMessage myMail = new MailMessage();
myMail.From = "Torben";

myMail.To = "pk***@isc-greiner.de" ;

myMail.Subject = "HALLO" ;
myMail.BodyFormat = MailFormat.Text ;

myMail.Body = "Moin";

// myMail.Attachments.Add (@"c:\test.txt");

SmtpMail.SmtpServer = "smtp.myserver.com";


SmtpMail.Send(myMail);

}

When I am starting the Program SmtpMail.Send <<<<--- overloaded , and the
email don´t arrive.


Nov 15 '05 #1
1 1115
Hi,

Does SmtpMail.Send( ) throw any exception?
if not the mail was sent , maybe the problem is in the smtp server you are
using, maybe you do not have relaying permission, or maybe your email is
just in the queue to be delivared on a later time.
I would suggest you set the myMail.From to a valid email in such a way that
you can get the error message back.

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Pkant" <pk***@isc-greiner.de> wrote in message
news:uM**************@TK2MSFTNGP12.phx.gbl...
Hi ,
I want to sent an Email out of an C# Programm.
I am using this code :

private void button3_Click(object sender, System.EventArgs e)

{

MailMessage myMail = new MailMessage();
myMail.From = "Torben";

myMail.To = "pk***@isc-greiner.de" ;

myMail.Subject = "HALLO" ;
myMail.BodyFormat = MailFormat.Text ;

myMail.Body = "Moin";

// myMail.Attachments.Add (@"c:\test.txt");

SmtpMail.SmtpServer = "smtp.myserver.com";


SmtpMail.Send(myMail);

}

When I am starting the Program SmtpMail.Send <<<<--- overloaded , and the
email don´t arrive.

Nov 15 '05 #2

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

Similar topics

12
by: Chuck Anderson | last post by:
Can anyone point me in the right direction? I want to use Php to automate confirmation of someone joining an email list by them replying to an email (so they don't have to have a browser?). I...
4
by: dmiller23462 | last post by:
So here's my problem.....I need to set up different email distributions based on which option in the following Select form has been chosen....For instance if "Putaway" is chosen it needs to email...
88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
2
by: BSG-SMTP-Gateway | last post by:
The following message sent by this account has violated system policy: Connection From: 64.253.55.90 From: python-list@python.org To: terriss@birdsall.com, q4dzsAEAAAAA@birdsall.com,...
26
by: libsfan01 | last post by:
Hi all! Can anyone show me how to check and email field on a form for the existence of these two characters. Kind regards Marc
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...

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.