1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Cannot send multiple email at once

Discussion in 'C#' started by deniz_seasdie, Jul 11, 2006.

  1. #1
    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)
     
    deniz_seasdie, Jul 11, 2006 IP
  2. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #2
    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)
     
    ludwig, Jul 11, 2006 IP
  3. deniz_seasdie

    deniz_seasdie Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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 ***.***.***.*
     
    deniz_seasdie, Jul 11, 2006 IP
  4. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #4
    well, that's why I proposed you to send 1 e-mail per user and not 1 mail for all at once
     
    ludwig, Jul 11, 2006 IP