문제

I am facing a weird problem in production, not happening in Local machine.

I hosted an application in godaddy that has a aspx page where it collects the email addresses from the text fields (txtTOEmail,txtCCEmail, txtBCCEmail).

When I call the send method on the mail object, the mail is sent twice. But this is not happening in my local machine.

NOTE : In my local machine I am using GMAIL smtp. In prod I am using Godaddy SMTP.

Any ideas and advices are welcomed.

Thanks in advance.

도움이 되었습니까?

해결책

Can you show the code that is sending the email? It is possible that GMail is consolidating two of the same address into one email instead of sending it twice.

다른 팁

Are you using the same email for more than one of the fields? If so, it could be a difference in how GMail sends vs. how Godaddy sends. GMail probably notices the two email addresses are the same and only sends one email. Godaddy may not check that.

For starters, you can dump the e-mail to a folder instead of sending it to the SMTP server to see if you actually send it twice:

  <system.net>
    <mailSettings>
      <smtp deliveryMethod="SpecifiedPickupDirectory" from="[from address]">
        <specifiedPickupDirectory pickupDirectoryLocation="[dump directory]" />
      </smtp>
    </mailSettings>
  </system.net>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top