473,480 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Sending emaikl

Hi I try to send email using this code it seems the code doesn't hhave any
problem but it doesn't send any emailv do you have any idea?how can I
configure SMTP Server?

MailMessage objEmail = new MailMessage();
objEmail.To = "ma******@yahoo.com";
objEmail.From = "IN**@FLOORONE.COM";
objEmail.Cc = "ma******@hotmail.com";
objEmail.Subject = "Test Email";
objEmail.Body = "test" ;
objEmail.Priority = MailPriority.High;
SmtpMail.SmtpServer = "localhost";
try
{
SmtpMail.Send(objEmail);
Response.Write("Your Email has been sent sucessfully -Thank You");
}
catch (Exception exc)
{
Response.Write("Send failure: " + exc.ToString());
}
--
mahsa
Jul 21 '05 #1
4 2336
SmtpMail.SmtpServer = "ip or name of server goes here";

The address that specify has to be an actually working smtp server.
"mahsa" wrote:
Hi I try to send email using this code it seems the code doesn't hhave any
problem but it doesn't send any emailv do you have any idea?how can I
configure SMTP Server?

MailMessage objEmail = new MailMessage();
objEmail.To = "ma******@yahoo.com";
objEmail.From = "IN**@FLOORONE.COM";
objEmail.Cc = "ma******@hotmail.com";
objEmail.Subject = "Test Email";
objEmail.Body = "test" ;
objEmail.Priority = MailPriority.High;
SmtpMail.SmtpServer = "localhost";
try
{
SmtpMail.Send(objEmail);
Response.Write("Your Email has been sent sucessfully -Thank You");
}
catch (Exception exc)
{
Response.Write("Send failure: " + exc.ToString());
}
--
mahsa

Jul 21 '05 #2
I try it nothing happen

"Alex Korchemniy" wrote:
SmtpMail.SmtpServer = "ip or name of server goes here";

The address that specify has to be an actually working smtp server.
"mahsa" wrote:
Hi I try to send email using this code it seems the code doesn't hhave any
problem but it doesn't send any emailv do you have any idea?how can I
configure SMTP Server?

MailMessage objEmail = new MailMessage();
objEmail.To = "ma******@yahoo.com";
objEmail.From = "IN**@FLOORONE.COM";
objEmail.Cc = "ma******@hotmail.com";
objEmail.Subject = "Test Email";
objEmail.Body = "test" ;
objEmail.Priority = MailPriority.High;
SmtpMail.SmtpServer = "localhost";
try
{
SmtpMail.Send(objEmail);
Response.Write("Your Email has been sent sucessfully -Thank You");
}
catch (Exception exc)
{
Response.Write("Send failure: " + exc.ToString());
}
--
mahsa

Jul 21 '05 #3
Try this: SmtpMail.smtpserver=""
so long
Diego

"mahsa" wrote:
Hi I try to send email using this code it seems the code doesn't hhave any
problem but it doesn't send any emailv do you have any idea?how can I
configure SMTP Server?

MailMessage objEmail = new MailMessage();
objEmail.To = "ma******@yahoo.com";
objEmail.From = "IN**@FLOORONE.COM";
objEmail.Cc = "ma******@hotmail.com";
objEmail.Subject = "Test Email";
objEmail.Body = "test" ;
objEmail.Priority = MailPriority.High;
SmtpMail.SmtpServer = "localhost";
try
{
SmtpMail.Send(objEmail);
Response.Write("Your Email has been sent sucessfully -Thank You");
}
catch (Exception exc)
{
Response.Write("Send failure: " + exc.ToString());
}
--
mahsa

Jul 21 '05 #4
moreover take a look if the localhost is configured. Installing IIs you MUST
choose smtp service as they are not installed by default
So long

"mahsa" wrote:
Hi I try to send email using this code it seems the code doesn't hhave any
problem but it doesn't send any emailv do you have any idea?how can I
configure SMTP Server?

MailMessage objEmail = new MailMessage();
objEmail.To = "ma******@yahoo.com";
objEmail.From = "IN**@FLOORONE.COM";
objEmail.Cc = "ma******@hotmail.com";
objEmail.Subject = "Test Email";
objEmail.Body = "test" ;
objEmail.Priority = MailPriority.High;
SmtpMail.SmtpServer = "localhost";
try
{
SmtpMail.Send(objEmail);
Response.Write("Your Email has been sent sucessfully -Thank You");
}
catch (Exception exc)
{
Response.Write("Send failure: " + exc.ToString());
}
--
mahsa

Jul 21 '05 #5

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

Similar topics

1
14478
by: coder_1024 | last post by:
I'm trying to send a packet of binary data to a UDP server. If I send a text string, it works fine. If I attempt to send binary data, it sends a UDP packet with 0 bytes of data (just the...
0
522
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
4938
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...
3
4611
by: Robert A. van Ginkel | last post by:
Hello Fellow Developer, I use the System.Net.Sockets to send/receive data (no tcpclient/tcplistener), I made a receivethread in my wrapper, the receivethread loops/sleeps while waiting for data...
4
8188
by: yaron | last post by:
Hi, I have a problem when sending data over TCP socket from c# client to java server. the connection established ok, but i can't send data from c# client to java server. it's work ok with...
7
3499
by: Lau | last post by:
I need to send 1000 emails from an asp.net website. Normally I would use System.Web.Mail.MailMessage() to send thru an SMTP server. But the large amount of emails results in a timeout. My server...
3
3592
by: Ant | last post by:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send mail, however it's not sending any emails. I'm using it on a Windows 2003 server. The simplest way to use this is...
0
1849
by: remya1000 | last post by:
by using FTP i can send files to server using vb.net. if the file is big, then it will take some time to complete the sending process to server.or if we were sending 3-4 files to the server one by...
9
3427
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
2378
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
7033
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,...
0
6903
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
7071
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...
1
6726
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
6861
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
5318
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,...
0
2987
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1291
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 ...
1
557
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.