I want to send some mails via my programm on my own server. I use PHP for this. Therefore I already implemented a code which works for 1-3 mails. But it takes about 10-15 seconds for the mail to be sent. After the 3rd one I always get a timeout error "The FastCGI process exceeded configured activity timeout".
- PHP Version 5.6.21
code I use:
<?php
$sendmail = "test@myserver.com";
$sendname = "testname";
$receiver = "myemail@domain.com";
$subject = "bla";
$text = "blubb";
mail($receiver, $subject, $text, "From: $sendname <$sendmail>");
?>
sendmail and receiver is replaced.
Why does it take so much time to send one email? I planned to mail several upon on click and within seconds.