473,406 Members | 2,549 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,406 software developers and data experts.

C# .Net Sending an e-mail to an application

5
Pls help, i am making an c# .net application that will always be running on a computer and i want it to write the subject (of the e-mail i recieved on my e-mail server) in the applications text box called textbox1 (textbox1.Text = "?????").
A code sample would be of great help...
Aug 21 '08 #1
8 1925
Plater
7,872 Expert 4TB
Do you have a method for retreiving the email header?
There are .NET methods for accessing information from Microsoft Exchange server, but .NET does not have anything built-in regarding POP3 or IMAP for accessing emails that I am aware of.
Aug 21 '08 #2
jive
5
Do have a method for retreiving the email header?
There are .NET methods for accessing information from Microsoft Exchange server, but .NET does not ahve anything regarding POP3 or IMAP for accessing emails that I am aware of.
Thx for helping...
I found the EAGetMail.dll to help me solve this problem and it worked...
Aug 26 '08 #3
Can you please provide me a sample code how to send Emails from C#.

Thanks.
Dijo.
Sep 4 '08 #4
jay123
121 100+
header file u need to add
using System.Net.Mail;


coding
Expand|Select|Wrap|Line Numbers
  1. MailMessage Mail1 = new MailMessage();
  2.                 MailAddress ma1 = new MailAddress(Emailfrom.Text);
  3.                 Mail1.From = ma1;
  4.                 Mail1.To.Add(emailto.Text);// reciever email id
  5.                 Mail1.CC.Add(Emailfrom.Text);// textbox from where sender email is to be retrieved
  6.                 Mail1.Subject = subject.Text;// subject textbox
  7.                 Mail1.IsBodyHtml = true;
  8.                 string msg = meassage.Text;// textbox in which nessage is written
  9.  
  10.                 Mail1.Body = msg;
  11.  
  12.                 try
  13.                 {
  14.                     SmtpClient smtpMailObj = new SmtpClient();
  15.                     smtpMailObj.Host = "xxx.xxx.xxx.xxx";// server ip address
  16.                     smtpMailObj.Send(Mail1);
  17.                     //  Response.Write("Your Message has been sent successfully");
  18.                     Label4.Text = "Your Message has been sent successfully";//label showing that message has been sent
  19.                 }
  20.  
  21.                 catch (Exception)
  22.                 {
  23.                     //Response.Write("Message Delivery Fails");
  24.                     Label4.Text = "Message Delivery Fails";
  25.                 }
Sep 4 '08 #5
Curtis Rutland
3,256 Expert 2GB
First of all, please use [code] tags when you post code.

Second, please do not "hijack" other threads. Unless your issue is exactly the same as the original poster's issue, please start your own thread.

MODERATOR
Sep 4 '08 #6
jay123
121 100+
First of all, please use [code] tags when you post code.

Second, please do not "hijack" other threads. Unless your issue is exactly the same as the original poster's issue, please start your own thread.

MODERATOR
sorry sir,
i m new to this developer form, so didnt know much of the rule that should be followed..
Sep 4 '08 #7
Curtis Rutland
3,256 Expert 2GB
sorry sir,
i m new to this developer form, so didnt know much of the rule that should be followed..
That's understandable.

Please read our posting guidelines for the rules:
http://bytes.com/forum/faq.php?faq=t...ing_guidelines
Sep 4 '08 #8
Thanks for providing me the coding, i'll work on it and let you know the status. by monday.

Thanks a lot.
Have a great weekend.
Sep 5 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
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....
1
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...
2
by: Joe | last post by:
Hi, I am sending an email from an asp page. Besides sending an email to sender, I am sending myself a BCC also. Out of 100 emails sent, about 5 recipients received a blank email (no text in...
3
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
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...
3
by: Sydney | last post by:
Hi, I am trying to construct a WSE 2.0 security SOAP request in VBScript on an HTML page to send off to a webservice. I think I've almost got it but I'm having an issue generating the nonce...
3
by: Sells, Fred | last post by:
I'm using MSW XP Pro with Python 2.4 to develop but production will be Linux with Python 2.3. (could upgrade to 2.4 if absolutely necessary) I can also switch to Linux for development if...
0
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...
10
by: Markgoldin | last post by:
I am sending an XML data from not dontnet process to a .Net via socket listener. Here is a data sample: <VFPData> <serverdata> <coderun>updateFloor</coderun> <area>MD2</area>...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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
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
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...

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.