| 223 | | === PHP notes === #PHP-notes |
| 224 | | * By default, BOINC uses PHP's `mail` function to send email to participants. |
| 225 | | This uses sendmail. |
| 226 | | If this doesn't work, you can use |
| 227 | | [http://phpmailer.sourceforge.net/ PHPMailer] instead, |
| 228 | | which is a very flexible mail-sending mechanism. To do this: |
| 229 | | * Download PHPMailer and put it under PROJECT/html/inc/phpmailer |
| 230 | | (i.e. the files class.smtp.php and class.phpmailer.php should be in that directory). |
| 231 | | * Set the following variables in your PROJECT/html/project/project.inc file |
| 232 | | (substitute your own values): |
| 233 | | {{{ |
| 234 | | $USE_PHPMAILER = true; |
| 235 | | $PHPMAILER_HOST = "xxx.xxx.xxx"; |
| 236 | | $PHPMAILER_MAILER = "smtp"; |
| 237 | | }}} |
| | 223 | |
| | 224 | === PHPMailer === #PHPMailer |
| | 225 | |
| | 226 | By default, BOINC uses PHP's `mail` function to send email to participants. |
| | 227 | This uses sendmail. |
| | 228 | If this doesn't work, you can use |
| | 229 | [https://github.com/Synchro/PHPMailer PHPMailer], |
| | 230 | is a very flexible mail-sending mechanism, instead. |
| | 231 | To do this: |
| | 232 | * Download PHPMailer and put it under PROJECT/html/inc/phpmailer |
| | 233 | (i.e. the files class.smtp.php and class.phpmailer.php should be in that directory). |
| | 234 | * Edit your html/project/project.inc to add a function like |
| | 235 | {{{ |
| | 236 | function make_php_mailer() { |
| | 237 | $mail = new PHPMailer(); |
| | 238 | $mail->IsSMTP(); |
| | 239 | $mail->SMTPAuth = true; |
| | 240 | $mail->SMTPSecure = "tls"; |
| | 241 | $mail->Host = "smtp.gmail.com"; |
| | 242 | $mail->Port = 587; |
| | 243 | $mail->Username = "john.doe@gmail.com"; |
| | 244 | $mail->Password = "xxx"; |
| | 245 | $mail->SetFrom('admin@boincproject.com', 'John Doe'); |
| | 246 | $mail->AddReplyTo("admin@boincproject.com", "John Doe"); |
| | 247 | $mail->From = "admin@boincproject.com"; |
| | 248 | return $mail; |
| | 249 | } |
| | 250 | }}} |
| | 251 | (substitute the values appropriate to your SMTP server). |