i want to send large file <1mb from email
my code:
protected void Button1_Click(object sender, EventArgs e)
{
MailMessage msg = new MailMessage();
msg.From = new MailAddress(txtmailadd.Text, "Sender's Name");
msg.To.Add(new MailAddress(txtTo.Text));
msg.Subject = txtsub.Text;
msg.Body = txtmsg.Text;
msg.IsBodyHtml = true;
if (FileUpload1.HasFile)
{
msg.Attachments.Add(new Attachment(FileUpload1.PostedFile.InputStream, FileUpload1.FileName));
}
SmtpClient smtp = new SmtpClient("smtp.gmail.com",587);
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.Credentials = new NetworkCredential(txtmailadd.Text, txtmailpass.Text);
lblresult.Visible = true;
smtp.EnableSsl = true;
try
{
smtp.Send(msg);
lblresult.Text = "E ...
Go to the complete details ...