2014-12-29 3 views
0

나는 며칠 동안 정상적으로 작동하는 통신을 위해 전자 메일을 보내야하는 asp.net에서 웹 응용 프로그램을 개발했습니다. 이제 하루 내 모든 이메일이 스팸 폴더에 들어갑니다.스팸 메일을받는 것을 피하는 방법

내가 내가받은 편지함 및 방법

+0

을 아마 중복 오 f http://stackoverflow.com/questions/3899298/aspx-send-mail-as-spam –

+0

다른 회사를 대신하여 마케팅 캠페인을 보내는 회사와 계약을 맺고 있습니다. 귀하의 질문에 대한 답변이 상당히 복잡합니다. 코드에는 분명히 잘못된 것이 없으며 보내는 내용, 보내는 위치 및 도메인/IP 구성 방법과 관련이 있습니다. 보낸 사람 주소를 알려 주실 수 있습니까? 보내지는 신체의 샘플은 어떻습니까? 이상한 주소 (예 : @ spamhaus.org)로 메일 링리스트를 확인 했습니까? 얼마나 많은 이메일을 분당 보내십니까? 전자 메일 트랜잭션이 관련되어 있습니까, 아니면 마케팅입니까? –

답변

0

추가로 이메일을 얻을 로그인하여, 회신하기 때문에 헤더를 이메일로 구독 취소 추가 할 메일을

public void SendMailMessage(string to, string subject, string body, AlternateView Altv, string bcc="") 
     { 
      // Instantiate a new instance of MailMessage 
      MailMessage mMailMessage = new MailMessage(); 

      // Set the sender address of the mail message 
      mMailMessage.From = new MailAddress("FORM EMAIL"); 
      // Set the recepient address of the mail message 

      mMailMessage.To.Add(new MailAddress(to)); 

      mMailMessage.Subject = subject; 
      // Set the body of the mail message 

      if (bcc != "") 
      { 
       mMailMessage.Bcc.Add(bcc); 
      } 

      mMailMessage.AlternateViews.Add(Altv); 

      mMailMessage.Body = body; 

      // Set the format of the mail message body as HTML 
      mMailMessage.IsBodyHtml = true; 
      // Set the priority of the mail message to normal 
      mMailMessage.Priority = MailPriority.Normal; 



      // Instantiate a new instance of SmtpClient 
      SmtpClient mSmtpClient = new SmtpClient(); 

      mSmtpClient.Host = "HOST"; 
      // Send the mail message 

      mSmtpClient.Credentials = new System.Net.NetworkCredential() 
      { 
       UserName = "EMAIID", 
       Password = "PASSWORD" 

      }; 
      mSmtpClient.Port = 25; 
      mSmtpClient.EnableSsl = true; 
      mSmtpClient.UseDefaultCredentials = true; 
      try 
      { 
       mSmtpClient.Send(mMailMessage); 
      } 
      catch 
      {} 

     } 

를 보내려면 다음 코드를 사용하여 코드에 :

 mMailMessage.BodyEncoding = System.Text.Encoding.GetEncoding("utf-8"); 

친절이를 참조하십시오 Avoiding Spam

관련 문제