Creating a group or mailing list is not an option, and this may not be possible, but I need a way of scanning
EmailMe and pulling the email address(es) to email from there. If two email addresses have the same `vendorID ONE email should be sent not multiple. Below is DDL - and using this as an example purple and green should both be the recipient on one email and blue should be sent it's own email.
How can I perform this? I am going to use
dbsendmail to send the message.
Create Table EmailMe ( ID int IDENTITY(1,1) PRIMARY KEY NOT NULL ,name varchar(100) ,vendorid int ,email varchar(500) ) Insert Into EmailMe (ID, name, email) VALUES ('purple', 12, 'firstname.lastname@example.org') ,('green', 12, 'email@example.com') ,('blue', 1, 'firstname.lastname@example.org')