I am trying to send multiple email at once. When I try,I can send only 1 email at once. I populate all mail address to "TO" box but when it comes to send email,I got error message from email server that indicates it does not seem like a recepient. Code: While Not CmdQueryUsers.EOF If IsValidEmail(CmdQueryUsers("EMAIL")) Then recipients = recipients & CmdQueryUsers("EMAIL") & ";" End If CmdQueryUsers.MoveNext Wend recipients = Left(recipients, Len(recipients)-1)
here is a sample, after you get "CmdQueryUsers" populated do as follows CmdQueryUsers.MoveFirst do while not CmdQueryUsers.EOF If IsValidEmail(CmdQueryUsers("EMAIL")) Then recipients = recipients & CmdQueryUsers("EMAIL") & ";" End If 'SEND YOU E-MAILS FROM HERE CmdQueryUsers.MoveNext loop CmdQueryUsers.Close what is this line for? recipients = Left(recipients, Len(recipients)-1)
thanks for quick reply, but my code works there is not any problem.The issue it only allows 1 email at once.when I try to send 1 mail to multiple recepients. I get the following error. <xxx@hotmail.com,yyyy@hotmail.com,eeee@hotmail.com>: ***.***.***.* does not like recipient. Remote host said: 553 sorry, we don't relay for [***.***.***.*] (#5.7.1) Giving up on ***.***.***.*