Hi Travis,

�� First things first.� Have you tried a Response.Write of your body content to see 
what it looks like?

Cheers,

Peter

P.S.� For more detailed email help, you'll want to try the aspNetEmail group at 
AspFriends.com (assuming we can't get you fixed up here).

 From: "Travis D. Falls" [EMAIL PROTECTED]

So, I am trying to loop a List Box and send an email to each one selected.
I am getting the following error:

System.InvalidCastException: Specified cast is not valid. On the
SmtpMail.Send(m); I don't know what is wrong though. Also I would like to
take that image and instead of attaching it embed it. Does anyone know how
CID work? thanks

for(int i = 0; i < ListBox1.Items.Count; i++){ 

String ID = ListBox1.Items[i].Value;

String email = ListBox1.Items[i].Text;

mailTo.Text = "ID " + ID + " email " + email ;

mailTo.Visible = true;

MailMessage m = new MailMessage();

m.To=email;

m.From="[EMAIL PROTECTED]";

m.Subject="B-SiDE @ The Red Door 10/10/2004"; 

m.Attachments.Add("C:/Inetpub/wwwroot/BSiDE/BSiDE/images/promo1_large.jpg");

String Message = "B-SiDE $4.00 Cover Ladies 1/2 price.";

Message += "$2.50 Beers; 10 on tab. ";

Message += "The Red Door, 675 Main Street Watertown CT. 06795";

Message += "860.945.6688";

m.Body=Message;

SmtpMail.Send(m);

}

Travis D. Falls


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to