Note that there are some explanatory texts on larger screens.

plurals
  1. POTrying to send smtp email in C#. No errors but does not get received. PHP works
    primarykey
    data
    text
    <p>I have a server that runs IIS and PHP. I have numerous webpages that send emails, some to me, some to the users. This all works great. I am on a Comcast Business Class account which means I can use smtp.comcast.net as my SMTP server, use port 25, and not use any sort of authentication which is great. And it works just fine. </p> <p>Now fast forward to today. I am writing some custom C# code to monitor a folder structure and basically email me the new file if it matches certain parameters. In my C# code, I try to use the same settings, but it doesn't work. The SmtpClient.Send() function does not throw an Exception and my code completes the routine as if everything is happy and working. But then I wait and wait and wait, and I never receive the email.</p> <pre><code>SmtpClient smtp = new SmtpClient("smtp.comcast.net"); smtp.Port = 25; smtp.EnableSsl = false; smtp.UseDefaultCredentials = false; smtp.Timeout = 2500; smtp.Send(mail); onStatusUpdate("Successfully sent email to " + mail.To + (mail.CC.Count &gt; 0 ? " and CC'd " + mail.CC.ToString() : "")); </code></pre> <p>The "mail" object is of type MailMessage and is setup with the To, From, subject, body, and CC. Also has HTML and Plain Text alternate views. </p> <p>I guess the easiest question, is if there is a trick to sending email the oldschool port-25 way in C# that doesn't exist in PHP?</p> <p>And the only reason I mention PHP is because I know my firewall isn't blocking port 25, I know my ISP has it open, I know I have the right server, I know it <em>should</em> work. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload