Mailer
Hallo,
Ik gebruik wamp, nou moet ik ook kunnen mailen via mail(). Ik zat is te kijken op google en ik zag dat je daar bijvoorbeeld php-mailer kan gebruiken.
Ik het het gedownload en de bestanden in een mapje geplaatst. Ook zit er een readme bij, maarja die is niet echt duidelijk, athans ik snap niet wat er bedoeld wordt met '
Copy class.phpmailer.php into your php.ini include_path.' Ik kijk dan in php.ini en zie dat stukje wel, maar snap het toch niet echt. Wie heeft hier ervaring mee en kan mij helpen,
Mvd,
Marcel
Ik gebruik wamp, nou moet ik ook kunnen mailen via mail(). Ik zat is te kijken op google en ik zag dat je daar bijvoorbeeld php-mailer kan gebruiken.
Ik het het gedownload en de bestanden in een mapje geplaatst. Ook zit er een readme bij, maarja die is niet echt duidelijk, athans ik snap niet wat er bedoeld wordt met '
Copy class.phpmailer.php into your php.ini include_path.' Ik kijk dan in php.ini en zie dat stukje wel, maar snap het toch niet echt. Wie heeft hier ervaring mee en kan mij helpen,
Mvd,
Marcel
Gesponsorde koppelingen:
Het default path wat daar staat verwijst normaliter naar:
<drive>:/php/includes
en in die directory kan je dan de class.phpmailer.php plaatsen
<drive>:/php/includes
en in die directory kan je dan de class.phpmailer.php plaatsen
Gewijzigd op 01/01/1970 01:00:00 door Noppes
ah oke, ik zal het is bekijken.
Kopieren naar je include_path is onzin. Je kan het bestand ook includen via:
of beter:
of beter:
Oke ik heb nu de bestanden gedownload en in een map gezet in mijn www directory.
Nu heb ik een bestandje test.php aangemaakt met de volgende code:
Hij zegt dit: Message was not sent.Mailer error: Could not instantiate mail function.
Wat doe ik fout?
Nu heb ik een bestandje test.php aangemaakt met de volgende code:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->From = "from@example.com";
$mail->FromName = "Your Name";
$mail->AddAddress("marcel1992@live.nl"); // This is the adress to witch the email has to be send.
$mail->Subject = "An HTML Message";
$mail->IsHTML(true); // This tell's the PhPMailer that the messages uses HTML.
$mail->Body = "Hello, <b>my friend</b>! \n\n This message uses HTML !";
$mail->AltBody = "Hello, my friend! \n\n This message uses HTML, but your email client did not support it !";
if(!$mail->Send()) // Now we send the email and check if it was send or not.
{
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
}
else
{
echo 'Message has been sent.';
}
?>
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->From = "from@example.com";
$mail->FromName = "Your Name";
$mail->AddAddress("marcel1992@live.nl"); // This is the adress to witch the email has to be send.
$mail->Subject = "An HTML Message";
$mail->IsHTML(true); // This tell's the PhPMailer that the messages uses HTML.
$mail->Body = "Hello, <b>my friend</b>! \n\n This message uses HTML !";
$mail->AltBody = "Hello, my friend! \n\n This message uses HTML, but your email client did not support it !";
if(!$mail->Send()) // Now we send the email and check if it was send or not.
{
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
}
else
{
echo 'Message has been sent.';
}
?>
Hij zegt dit: Message was not sent.Mailer error: Could not instantiate mail function.
Wat doe ik fout?
Als je dit script lokaal draait, zul je ook een mailserver lokaal moeten hebben draaien. Bijvoorbeeld ArgoSoft of iets dergelijks.
Of, gebruik de mailserver (smtp) van je provider.



