Jump to content

Class sending mails

- - - - -

  • Please log in to reply
No replies to this topic

#1
AdrianWierciochPHP

AdrianWierciochPHP

    Learning Programmer

  • Members
  • PipPipPip
  • 54 posts
Hi, it`s my first post here so Hi all again.

I have written some class to send mails, it`s basic and I have just problem with method to send it. I think it can look like this:

public function sendMails()

{

for ($i=0; $i <= count($this->list_of_mails);$i++)

{

    $try = mail($this->list_of_mails[$i], $this->subject, $this->message);

    if (!$try)

    {

         $this->errors['mail'][] = $this->list_of_mail[$i];

    }

}

}


I will explain it:
$this->list_of_mails is prepared by user list of e-mails somethings peoples
$this->errors is associative arrays of errors while script is executing
I know it is not good method because I started programing one year ago and I wrote only basic script but I must start to earn money so I have to learn good programing. This script is to sell, so it must be very good. I hope you just check it, I`m thanking you now :)
Sorry for my english, but I have never written any post in english :)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users