Tuesday, January 27, 2009

Sending emails using System.Net.Mail

നമ്മള്‍ സാദാരണ ഈമെയിലുകള്‍ അയക്കാന്‍ ഉപയോഗിക്കുന്ന പദം
using SmtpClient sm = new SmtpClient("localhost")
എന്നാണല്ലോ.
അപ്പോള്‍ ചിലപ്പോള്‍ 'Cannot send mail'. എന്ന എറര്‍ വരും... സാദരണം

പ്രതിവിധി
ഈ പറഞ്ഞ എറര്‍ .net 2.. ഇല്‍മാത്രമെ വരുക ഉള്ളു. ഇതിനുള്ള ഒരു കാരണം McAfee antivirus!!! ആണ്.
ഇതു തിരുത്താന്‍ ഇപ്രകാരം ചെയ്യുക (അത് ഞാന്‍ ഇംഗ്ലീഷില്‍ പറയാം)
Go to the Virusscan Console -> Select Properties and in the 'Port Blocking' tab, uncheck the 'Prevent mass mailing worms from sending email' option.
If after this, you get a message, cannot relay to 'address', then enable Relaying for your SMTP server.

No comments:

Post a Comment