I don't mean to be redundant here, so I appologize if I am.....I see solutions similar to this, but I need more hand holding for the code.
I have added a form to my vb.net application which sends emails quite nicely via smtp. I used the system.net.mail namespace to do so.
ok...so far so good...now here is what I can't seem to get working correctly: My boss asked me to create an app which opens an existing table (i.e. customer billing info) in ms sql 2005, allows a user to be able to choose which customers an email is going to be sent to, and be able to hit a send button which would send the emails out.
Here's the thing....the emails will be billing invoices. The invoice is a different pdf file unique to each customer obviously. Sending the attachment is no problem, nor is multiple attachments. what I am having a problem with is sending a particular attachment(s) to a particular customer.
In essense, let's say I want it set up so that a list box containing each customer is shown on a form. The user should be able to select the name(s) from the list, be able to type a common message in a text box on the form (i.e. "Here is your bill for August, 2007"), and be able to hit send. An email will be sent out to each selected customer, along with a common from, subject, message body, and a unique pdf attachment. The path of the attachment i suppose could be stored in a temp sql table if it's best.
Help me! Should this loop through and send each mail one by one? Should it send a bulk of emails at once? I need to see the code for this in detail. I hope someone can help. BTW...I need to also have a record somewhere of what mails were send successfully or not.