473,395 Members | 1,968 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,395 software developers and data experts.

SMTP sending e-mail

I have an application that sends simple e-mails using SMTP, it no longer
works with a lot of e-mail servers.

Basically the problem seems to be that I am no longer sending a valid logon
sequence. The server says the user is not authorized, if I switch to
Outlook it works.

Code to send authorizion.

this.SendData("AUTH LOGIN" + CRLF);
string user =
Convert.ToBase64String(System.Text.ASCIIEncoding.A SCII.GetBytes(this.User));
this.SendData(user + CRLF);
string pw =
Convert.ToBase64String(System.Text.ASCIIEncoding.A SCII.GetBytes(this.Password));
result = this.SendData(pw + CRLF);
if(result.StartsWith("235"))
break;

This is what outlook is doing per the log file:

[tx] AUTH NTLM
<rx> 334 NTLM supported
[tx] TlRM.....
Any one know how to send NTLM type logon or another methed to work around
this problem?

Regards,
John
Jul 21 '05 #1
5 2188
http://curl.netmirror.org/rfc/ntlm.html looks like a good starting point.

Any reason for not using the System.Web.Mail class that is part of the .NET
framework ? The fields property (with 1.1) allows to define how you'll
access to the SMTP server :
http://www.codeproject.com/dotnet/Sy..._SMTP_AUTH.asp

Patrice

--

"John J. Hughes II" <no@invalid.com> a écrit dans le message de
news:e4**************@tk2msftngp13.phx.gbl...
I have an application that sends simple e-mails using SMTP, it no longer
works with a lot of e-mail servers.

Basically the problem seems to be that I am no longer sending a valid logon sequence. The server says the user is not authorized, if I switch to
Outlook it works.

Code to send authorizion.

this.SendData("AUTH LOGIN" + CRLF);
string user =
Convert.ToBase64String(System.Text.ASCIIEncoding.A SCII.GetBytes(this.User)); this.SendData(user + CRLF);
string pw =
Convert.ToBase64String(System.Text.ASCIIEncoding.A SCII.GetBytes(this.Passwor
d)); result = this.SendData(pw + CRLF);
if(result.StartsWith("235"))
break;

This is what outlook is doing per the log file:

[tx] AUTH NTLM
<rx> 334 NTLM supported
[tx] TlRM.....
Any one know how to send NTLM type logon or another methed to work around
this problem?

Regards,
John

Jul 21 '05 #2
Patrice,

Thanks for the lead...

I would perfer to use the System.Web.Mail and that is what I used in the
first place. I recall running into a problem if IIS was not installed since
it use that or something.

Oh well I have tried again and am getting this error, any suggestion?

Error:Could not access 'CDO.Message' object.
Inner:Exception has been thrown by the target of an invocation.
Stack: at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj,
String methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at RAMSComThrd.sendAlarm..ctor(String ac, String num, String data) in
c:\documents and settings\all users\documents\shared
vsp\work\ramscomthrd\sendalarm.cs:line 70
at MailTest.Form1.btnTest_Click(Object sender, EventArgs e) in
c:\documents and settings\john @ work\my documents\visual studio
projects\mailtest\form1.cs:line 494

Regards,
John
Jul 21 '05 #3
Yes, you need to install the SMTP service first (IMO this service doesn't
require IIS itself).

Patrice

--

"John J. Hughes II" <no@invalid.com> a écrit dans le message de
news:%2****************@tk2msftngp13.phx.gbl...
Patrice,

Thanks for the lead...

I would perfer to use the System.Web.Mail and that is what I used in the
first place. I recall running into a problem if IIS was not installed since it use that or something.

Oh well I have tried again and am getting this error, any suggestion?

Error:Could not access 'CDO.Message' object.
Inner:Exception has been thrown by the target of an invocation.
Stack: at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj,
String methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at RAMSComThrd.sendAlarm..ctor(String ac, String num, String data) in
c:\documents and settings\all users\documents\shared
vsp\work\ramscomthrd\sendalarm.cs:line 70
at MailTest.Form1.btnTest_Click(Object sender, EventArgs e) in
c:\documents and settings\john @ work\my documents\visual studio
projects\mailtest\form1.cs:line 494

Regards,
John

Jul 21 '05 #4
Patrice,
Thanks.

Regards,
John
Jul 21 '05 #5
www.vbip.com

John J. Hughes II wrote:
Patrice,
Thanks.

Regards,
John


Jul 21 '05 #6

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

Similar topics

15
by: Steven Burn | last post by:
My server has POP but only has SMTP if sending to my domain, and not other domains (such as hotmail). I'm therefore wondering, if anyone knows of any scripts etc, that will allow me to have a sort...
5
by: Robert Suffecool | last post by:
Hello everyone, I'm having problems getting the virtual SMTP server (in IIS) from sending an email message that was created from an ASP script. The messages are stored in the...
6
by: Fernando M. | last post by:
Hi, i made a test with smtplib module a few days ago, for sending mails, and i was wondering if there's another module for running an SMTP server, so i could make a standalone script for sending...
7
by: William Case | last post by:
Hi Folks, Does anyone have a line on some well written black box code that will handle SMTP mailing sessions and can be integrated into a VBA app? Thanks.
0
by: Guoqi Zheng | last post by:
Dear Sir, I wrote an Smtp myself to send email. Everything works fine when I am sending English email. However, when I send an email with special characters in it, there is always a problem. I...
1
by: Jack Fox | last post by:
Suddenly I need to change an email sending program from using SMTP to Authenticated SMTP (ASMTP), and my old code SmtpMail.SmtpServer = "my.smtpauth.server"; SmtpMail.Send(Message); no longer...
1
by: | last post by:
Hi all, I am trying to send an email in some asp.net code and our SMTP Server (EXchange) keeps kicking back with this message:- Mailbox unavailable. The server response was: 5.7.1 Requested...
4
by: Jerry Spence1 | last post by:
I am trying, without much luck, to find help in implementing an SMTP server/relay program from VB2005. My company produces software to go on customer's PCs. I am trying to implement email fault...
4
by: peter smith | last post by:
Hi all. We already use the SMTP features in .NET for sending SMTP email, but how can you receive SMTP email using the .NET framework. Basically we need to catch email from a given address and...
8
by: Marty | last post by:
I'm having issues sending an email to an "@page.nextel.com" email address. I can send to any other email address fine, but when I try the page.nextel.com it gives me this error: ...
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
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?
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
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
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
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...

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.