SMTP EmaiL Authentication???

Ok so here is my code, I am trying to send an email upon user registration. I had to do a little research on Authenticating with ASP 2.0 but This looks like it should be working... Can anyone tell me what I am doing wrong, as I keep getting errors
Code:
HttpContext ctx = HttpContext.Current;
            StreamReader sr = new StreamReader(ctx.Server.MapPath("/library/emails/Welcome.txt"));
            string strBody = sr.ReadToEnd();
            sr.Dispose();
            

            strBody = strBody.Replace("{!Alias}", _FirstName);
            strBody = strBody.Replace("{!Password}", _Email);

            MailAddress from = new MailAddress("[email protected]", "My Title.");
            MailAddress to = new MailAddress(_Email);
            MailMessage message = new MailMessage(from, to);
            
            message.Subject = "Welcome to the site!";
            message.Body = strBody;
            message.IsBodyHtml = false;
            message.Priority = MailPriority.Normal;
            SmtpClient smtp = new SmtpClient("mail4.mysite.com");
            
            smtp.UseDefaultCredentials = false;
            smtp.Credentials = new System.Net.NetworkCredential("myUSERNAME", "myPASSWORD");
            smtp.Send(message);

I error out on the smtp.Send method. Not sure what I'm doing wrong, but thought maybe some new eyes would see something I am missing.

The Error I get is as follows
Error in processing. The server response was: http://www.spamhaus.org/query/bl?ip=64.187.108.200
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Mail.SmtpException: Error in processing. The server response was: http://www.spamhaus.org/query/bl?ip=64.187.108.200
Any assistance would be great!
 
FYI, today I started having problems sending/receiving emails via form coded with PHP and ColdFusion.

It might not be a problem with your code.

The php script I inherited and I am not sure if it authenticates BUT it was working until about 10am PST this morning.

The CF definitely authentics and worked perfectly on one of my other sites last week. New site, same code, no dice.

So before you go pulling your hair out. I thought I would toss that out.

I have tickets open on both, so far they have not been resolved.
 
dndco said:
FYI, today I started having problems sending/receiving emails via form coded with PHP and ColdFusion.

It might not be a problem with your code.

The php script I inherited and I am not sure if it authenticates BUT it was working until about 10am PST this morning.

The CF definitely authentics and worked perfectly on one of my other sites last week. New site, same code, no dice.

So before you go pulling your hair out. I thought I would toss that out.

I have tickets open on both, so far they have not been resolved.


Thanks for the info. Have any idea how to work around this? Would working with mime possibly bypass the problem do you think"?
 
It is because some servers got their subnets listed in spam block lists, we are still working on this but have no abuse complaints about them, very frustrating to get blocked with no abuse complaints!
 
It appears that mail4 is still listed?

When authenticating the smtp should we be using the email alias with the @domain.com or without it?

For instance, should I be using [email protected] for my Username for Authentication or just "myname" ?
 
no, the mailservers are NOT listed, just the web server itself.

We are trying to get details on the how/why as they normally send this before listing, but did not.
 
This was resolved around 10:22 ps PST last night. That is when I received all the test emails I had sent earlier in the day as well as all the orders that had been submitted.

However, it seems to have returned again this morning. I just sent some tests through and received nothign again.

Any idea when this will get resolved?
 
We have a subnet that is shared with someone else at our colo cage, and they we are on a seperate subnet, but the same master ARIN subnet, we are trying urgently to find if this is their fault, or ours, but we have no abuse complaints saying it is us.
 
I have gotten replies from the RBL operators, and we are working out the issue, the IPs have been delisted/are being delisted now, and should not come back up, it was a bit of a policy change that caused this and had adverse side-effects.
 
user@domain....

And I will get this one de-listed, I think it got overlooked in the list I gave that was our IPs.
 
Back
Top