473,804 Members | 3,399 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(fro m, 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(mai l);

here is the VB Code:
Set objMessage = CreateObject("C DO.Message")
objMessage.Subj ect = "Test only, please don't block me"
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/smtpserver")
= "xxx.xxx.xxx.xx x"
objMessage.From = "ZZ*@CCC.co m"
objMessage.To = "SS*@hotmail.co m"
objMessage.Text Body = "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 3210
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
3389
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. Nancy W
3
3038
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 identifies itself as the computer name which is not in domain.com format, triggering spam filter problems). Instead, I want to have my code send through an SMTP server of a company that we pay for mail service. But they require a username and password....
5
1395
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 except the mail which gets send to hotmail goes and sits in the junk folder of hotmail. Anyone has any ideas why is it happening? anything i need to set in my message header?
1
2958
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 the user wants to used the Linux server to send email messages. (already installed the SMTP service in that). Unfortunatelly one error shown after the sending funciton invoked. It shows "Pickup directory is not existed,x,x,x,,"
7
7752
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 free edition for anti-virus. I use an ISP provider from my country and according to them I do not need to perform authentication while sending mails through their SMTP address. Thus I am using external SMTP server. I don't have IIS installed...
5
4223
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 mailto://mymail@domail.com. But this only works if the user has configured Outlook or something. Many users use web-based mails here so if I do so, Outlook Express's a new account wizard will pop-up. Futhure more this reveals user e-mails. Some people...
3
2882
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 an SMTP server like if I am myself an SMTP server that is forwarding a mail. What classes can be used on .NET FW 2? Thanks,
6
4545
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 your own email account, or do shared servers typically have services available that can be used for this? I'm creating an application for a client and am not sure if I should ask them for their email account information, which I assume includes...
4
3378
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 550" and below is the code. the only thing i had to to do was change the port as our isp blocks 25. Just wondering if anyone has run into this beefore. TIA
0
9705
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
9576
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
10310
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
10074
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...
0
9138
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7613
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
6847
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5515
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...
3
2983
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.