Sending to a small list from database - question
Posted: Fri Oct 26, 2007 8:07 am
Hello. I have a question re sending to small lists (of less than, say, 100 recipients, every 10 or so minutes as an autoresponder to comments made on a site).
At the moment I load the addresses into an array which prints like (address@domain.com,address@domain2.com,address@domain3.com) and so forth. I then use the php mail() function to BCC all recipients. I think using SwiftMailer would be much better and permit far more customisation... if I can get it to work!
I've read the documentation and played around with it, and it's all great, BUT, I was wondering if the above would work easily with Swift? Can I replace $recipients with a string of addresses? I've hacked away at it with the basic PHP knowledge I have but have had no success.
If this isn't possible (which seems more than likely!), what is the easiest way to batch send a list of addresses from a database? I've had a read of the 'iterators' but just can't seem to get anything to work.
I've got two relevant fields in a database - email and name - and was hoping somebody could post some sample code that they might use themselves to steer a PHP moron in the right direction. I don’t want any functionality beyond the basic send.
Any advice is appreciated.
At the moment I load the addresses into an array which prints like (address@domain.com,address@domain2.com,address@domain3.com) and so forth. I then use the php mail() function to BCC all recipients. I think using SwiftMailer would be much better and permit far more customisation... if I can get it to work!
I've read the documentation and played around with it, and it's all great, BUT, I was wondering if the above would work easily with Swift? Can I replace $recipients with a string of addresses? I've hacked away at it with the basic PHP knowledge I have but have had no success.
If this isn't possible (which seems more than likely!), what is the easiest way to batch send a list of addresses from a database? I've had a read of the 'iterators' but just can't seem to get anything to work.
I've got two relevant fields in a database - email and name - and was hoping somebody could post some sample code that they might use themselves to steer a PHP moron in the right direction. I don’t want any functionality beyond the basic send.
Any advice is appreciated.