Base different in mail function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maheswaran
    New Member
    • Mar 2007
    • 190

    Base different in mail function

    Hi all,

    What is the base different to the flow below

    first

    Code:
     $headers .="cc: [email]1@one.com,2@one.com,3@one.com[/email]";
     mail($recipient, $subject, $adminmsg, $headers."\r\n");
    Second

    Code:
     foreach($mailids as $mailid)
    {
    $recipient="$maild";
    mail($recipient, $subject, $adminmsg, $headers."\r\n");
    }
    what is base different and which is the best method to send bulk mail
    Last edited by Markus; Apr 6 '09, 10:40 AM. Reason: Added [code] tags.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    Originally posted by maheswaran
    what is base different and which is the best method to send bulk mail
    in my opinion Swiftmailer's batchSend() method.

    when using mail() the second one, because the privacy is kept.

    Comment

    • maheswaran
      New Member
      • Mar 2007
      • 190

      #3
      Thanks for the reply.

      Is there any functionality difference?. Like If use first one then mail function called only one time, if choose second one then mail function called number of time depends on loop?. just i want to know , if we use first method to put cc: to number of persons, is mail function called only once for all mail ids in cc or mail function would call number of time depends on mail ids putted in cc..?

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        the mail() function itself is called only once in the first case, but I dont know how sendmail (the program that actually sends the mails) handles this.

        Comment

        • maheswaran
          New Member
          • Mar 2007
          • 190

          #5
          lets welcome others idea.

          Comment

          Working...