Hi
I have trouble sending mail out .. it comes with no errors, so hope some can see the problem .. thanks :-)
protected void Button1_Click(object sender, EventArgs e)
{
try
{
MailMessage msg = new MailMessage(txtFrom.Text, "gmail@gmail.com", txtSubject.Text, txtMessage.Text);
if (string.IsNullOrEmpty(fileUpload.PostedFile.FileName))
{
}
else
{
msg.Attachments.Add(new Attachment(fileUpload.PostedFile.FileName));
}
SmtpClient mySmtp = new SmtpClient("localhost", 25);
mySmtp.Send(msg);
lblResult.Text = "Mail Sent";
}
catch (Exception ex)
{
...
Go to the complete details ...