473,386 Members | 1,798 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.

How can you write a smtp client which can send email to a hotmail account?

Hi,
I am trying to write some codes to send emails through a SMTP
server. I wrote a C++ version using pure socket programming and SMTP
protocol, a VB version using CDO and a C# version using
System.Net.Mail. Now all of them works great with any email account but
hotmail. So here is the C# code:
MailAddress from = new MailAddress("ZZ*@CCC.com", "XXX");
MailAddress to = new MailAddress("SS*@hotmail.com", "YYY");

MailMessage mail = new MailMessage(from, to);

mail.Subject = "Test only, please don't block me";
mail.Body = "Test only, please don't block me";

SmtpClient client = new SmtpClient("xxx.xxx.xxx.xxx");
client.Send(mail);

here is the VB Code:
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Test only, please don't block me"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= "xxx.xxx.xxx.xxx"
objMessage.From = "ZZ*@CCC.com"
objMessage.To = "SS*@hotmail.com"
objMessage.TextBody = "Test only, please don't block me"
objMessage.Send

I wouldn't put C++ code here because it's too long.

1. I can use Outlook to send out email (on the same machine where
my code runs) and hotmail will receive it with no problem. So I know my
SMTP server was not blocked by Hotmail.
2. My SMTP server doesn't require authentication, I know it's bad.
But I can't change that.
3. Somebody told me that I would need some strange header to make
the hotmail like my email. Therefore I set up a sniffer and get all
headers which are used by Outlook. I used all of them in my C++ code
but it still doesn't work.

Now this hotmail problem drives me crazy and I have wasted 4
hours on it with no clue. Can anybody help me out of here?

Thanks
Ou

P.S It's a little bit ironic to see that MS' product doesn't work
well on its own product.

Sep 21 '06 #1
1 3146
Let me clarify a little bit, I am not going to talk with hotmail
straightly. I am going to talk a SMTP server which will relay my email
to hotmail. And as I said, I am sure that my SMTP server was not
blocked because I can use Outlook to send email to an hotmail account
through my SMTP server.

Sep 21 '06 #2

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

Similar topics

21
by: Nancy | last post by:
Hi, Guys, Is there any other way to use python or mod_python writing a web page? I mean, not use "form.py/email", no SMTP server. <form action="form.py/email" method="POST"> ... Thanks a lot. ...
3
by: RN | last post by:
I am tired of sending mail from the built-in SMTP service for so many reasons (errors are nondescriptive in the event log, it doesn't let me control which IP address it sends from, and it...
5
by: venky | last post by:
Hello all, I wrote a small program which sends email to different address. I am using smtp object and i set smtp server as my verizon online. I use to send the email, everything works fine...
1
by: Benny Ng | last post by:
Dear All, Now I just finished my winform application. And a part of that is to send email reminder to the users. It's working fine in the server that with SMTP service in Windows 2003. But now...
7
by: oopsbabies | last post by:
Hello everyone, I am using Apache 1.3.33 as the web server and PHP version 4.3.10. My machine is using Windows XP 2002 professional edition which comes with a Windows firewall. I am using McAfee...
5
by: Sin Jeong-hun | last post by:
Hi. I would like to let users send bug reports or other messages to me. Maybe the easiest way to send e-mails from my application is just use the default e-mail agent by executing a link...
3
by: BLUE | last post by:
I want to send an email from my web service. I do not want to act like an email client, giving credentials of an existing email account to send messages: I would like to send my mail directly to...
6
by: Jonathan Wood | last post by:
I was curious what most people do when they want to send an email from their Web application, which is hosted on a shared server owned by another company. Do you simply specify the SMTP host of...
4
by: Brian | last post by:
Hello all, we don't actually host our own server but still should work the same. Here is the error message i get "error mailbox unavailable. The server response was: must be authenticated code...
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
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
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
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...

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.