473,785 Members | 2,218 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Send Email

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?

MailMessage objEmail = new MailMessage();
objEmail.To = "ma******@yahoo .com";
objEmail.From = "IN**@FLOORONE. COM";
objEmail.Cc = "ma******@hotma il.com";
objEmail.Subjec t = "Test Email";
objEmail.Body = "test" ;
objEmail.Priori ty = MailPriority.Hi gh;
SmtpMail.SmtpSe rver = "localhost" ;
try
{
SmtpMail.Send(o bjEmail);
Response.Write( "Your Email has been sent sucessfully -Thank You");
}
catch (Exception exc)
{
Response.Write( "Send failure: " + exc.ToString()) ;
}
--
mahsa
Jul 21 '05 #1
2 1401
Do you have your SMTP Server at "localhost" configured properly? How about
DNS? Does it resolve yahoo.com and hotmail.com? This looks to me like it's
a problem at the SMTP server side of things.

--
Ben Lucas
Lead Developer
Solien Technology, Inc.
www.solien.com

"mahsa" <ma***@discussi ons.microsoft.c om> wrote in message
news:F9******** *************** ***********@mic rosoft.com...
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?

MailMessage objEmail = new MailMessage();
objEmail.To = "ma******@yahoo .com";
objEmail.From = "IN**@FLOORONE. COM";
objEmail.Cc = "ma******@hotma il.com";
objEmail.Subjec t = "Test Email";
objEmail.Body = "test" ;
objEmail.Priori ty = MailPriority.Hi gh;
SmtpMail.SmtpSe rver = "localhost" ;
try
{
SmtpMail.Send(o bjEmail);
Response.Write( "Your Email has been sent sucessfully -Thank You");
}
catch (Exception exc)
{
Response.Write( "Send failure: " + exc.ToString()) ;
}
--
mahsa

Jul 21 '05 #2
Hi how can I configure smtp? and what is the dns?

"Ben Lucas" wrote:
Do you have your SMTP Server at "localhost" configured properly? How about
DNS? Does it resolve yahoo.com and hotmail.com? This looks to me like it's
a problem at the SMTP server side of things.

--
Ben Lucas
Lead Developer
Solien Technology, Inc.
www.solien.com

"mahsa" <ma***@discussi ons.microsoft.c om> wrote in message
news:F9******** *************** ***********@mic rosoft.com...
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?

MailMessage objEmail = new MailMessage();
objEmail.To = "ma******@yahoo .com";
objEmail.From = "IN**@FLOORONE. COM";
objEmail.Cc = "ma******@hotma il.com";
objEmail.Subjec t = "Test Email";
objEmail.Body = "test" ;
objEmail.Priori ty = MailPriority.Hi gh;
SmtpMail.SmtpSe rver = "localhost" ;
try
{
SmtpMail.Send(o bjEmail);
Response.Write( "Your Email has been sent sucessfully -Thank You");
}
catch (Exception exc)
{
Response.Write( "Send failure: " + exc.ToString()) ;
}
--
mahsa


Jul 21 '05 #3

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

Similar topics

11
12091
by: Google Mike | last post by:
I've got RH9 Linux with default PHP. Is there a way to send email on Linux to an Exchange Server from PHP and/or other tools when there is *NOT* SMTP access? Has anyone figured out a way to use PHP to get inside an OWA (Microsoft Outlook Web Access) website to send email that way? The reason I ask is because my corporate office is going to do away with our rogue SMTP server access and force everything through Exchange
40
11899
by: ian | last post by:
Hi, I'm a newbie (oh no I can here you say.... another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the following import win32com.client
0
3711
by: David Burson | last post by:
Hi, I have a VB.NET windows app that needs to automatically send a simple text email when my users run a new version of the app for the first time. I thought this would be simple, but after days of reading posts and testing, I see it is not - unless I'm missing something? I'm not an email guru. All of my users will be running at least Windows 2000, most on XP sp2. Some of my users will have Outlook, many will be using Outlook...
9
4311
by: Bob Jones | last post by:
We have developed a commercial ASP.net application (personal nutrition management and tracking); we want to send smtp email from within it. For our development box, we use WinXP Pro, IIS 5.5, VisualStudio2002, VB as programing language. Our test/development version of the web app as hosted on our "localhost" works fine; our "Default SMTP Virtual Server" is running (per the IIS console).
3
4559
by: Gerard | last post by:
Hello I have created a windows service to monitor a database, it starts some checks when a timer elapses. The checks send emails depending on their findings. My issue is that when I created a windows application it worked fine, however I need to use a service as I don't want to rely on a user being logged in. The errors I get are: Index #:System.Web.HttpException: Could not access 'CDO.Message' object. --->...
14
9143
by: supz | last post by:
Hi, I use the standard code given below to send an email from an ASP.NET web form. The code executes fine but no Email is sent. All emails get queued in the Inetpub mail queue. I'm using my local default SMTP Server and my from address is a valid Yahoo/Hotmail address. I have configures the local SMTP Server to allow the IP Address 127.0.0.1.
8
7284
by: shapper | last post by:
Hello, I am trying to send an email using Asp.Net 2.0. I am getting the following error: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: No such user here at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify,
9
77444
by: Mahernoz | last post by:
Can i send an email from JavaScript? Is it possible? If yes please the code to send email using javascript...
2
5636
by: Malli mindwave | last post by:
Hi, We are using the yahoowebHostiing service for my company website, In that one screen of the SendComments/FeedBack section is there, I'm basically dot.net develeoper ,but yahoowebhosting not support .asp,.aspx files, it supports PHP files, I'm searching in JavaScript ,but not found any matter, I'don't Know PHP.I'm having lot of pressure of higer officials.Please help me on this.
5
2162
by: Mike | last post by:
I have a page with a textbox that a user can enter in mutliple email addresses such as: user1@yahoo.com;user2@yahoo.com;user3@gmail.com; and so on, I then have a foreach loop to get all of the emaill addresses and send emails out. the problem is that all of the email addresses the email is being sent to is showing in the section so everyone knows who's getting the email. How can I have 1 email address showing in the section so no...
0
9646
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
9483
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
10096
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
9956
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...
1
7504
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5386
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4055
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
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2887
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.