473,385 Members | 1,548 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,385 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 2186
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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...
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
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...

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.