Dear Reader,
Can someone axplane to me why the file witch i have attached by mail is lost after sending to the first email adres,. Whe the script is going to the second mailadres in the list he is sending a empty file.
My script,
protected void BtnSendMail_Click(object sender, EventArgs e)
{
// Count the mailadresses
foreach (ListItem item in LbxMailList.Items)
{
MailMessage mail = new MailMessage();
mail.To.Add(item.Text);
mail.From = new MailAddress("xxxxx@gmail.com");
mail.Subject = (TbxSubject.Text);
//mail.Attachments.Add = (Filename);
mail.Priority = MailPriority.High;
mail.Body = (TbxBody.Text);
if (FileUpload1.HasFile)
{
string file ...
Go to the complete details ...