mail(); Anderen Server benutzen

Pott-Taucher

Mitglied
Hi!

Ich habe meine PHP-Webspace kostenlos bei ohost.de

Leider scheint dort die Mail Funktion nicht richtig zu funktionieren.

Die E-Mails kommen entweder garnicht, oder mit extremer Zeitverzögerung an.

Kann ich die mails irgendwie über nen anderen Server versenden? Zum Beipsiel eine andere Arcor Mailaddy oder so

Danke - Timo

PS: Brauche noch ne .de Domain mit php und mysql - wo bekomme ich sowas günstig
Webspace so 100MB - Traffic ?
 
Informationen zu mail():
http://de3.php.net/mail

Wie im PHP-Manual beschrieben wird der SMTP-Server in der PHP.INI eingetragen.
Allerdings geht das nur bei Windows Systemen. Für Linux gibt es eine andere Lösung mit PEAR (steht auf der gleichen Seite wie ich oben angegeben habe:

http://de3.php.net/mail
roberto dot silva at mexicoshipping dot net
24-Jan-2004 01:16
If you can't use or don't understand how to use the sendmail program from linux, you can use a PEAR object to send mail.

PHP:
<?
include("Mail.php");

$recipients = "mail_to@domain.mail";

$headers["From"]    = "mail_from@domain.mail";
$headers["To"]      = "mail_to@domain.mail";
$headers["Subject"] = "Test message";

$body = "TEST MESSAGE!";

$params["host"] = "smtp.server";
$params["port"] = "25";
$params["auth"] = true;
$params["username"] = "user";
$params["password"] = "password";

// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory("smtp", $params);

$mail_object->send($recipients, $headers, $body);
?>
In my case, i use a smtp server that require authentication, and sendmail configuration is almost cryptic to me.

PEAR is already installed in PHP 4.0.3 , if not, you must go to pear.php.net and install it, in my case, I needed to add the Socket.php to the PEAR library.
 
Ich habe dasselbe Problem wie Pott-Taucher und habe den Code von Neurodeamon ausprobiert, allerdings bekomme ich die Fehlermeldung

Fatal error: Undefined class name 'mail' in /www/htdocs/.../mail/send.php on line 19

Bin leider mit OOP und ähnlichem nicht so fit, kann mir jemand helfen wie's trotzdem funktioniert ?
 
Ok,

kann nicht funktionieren, bei meinem Webhoster ist wohl kein PEAR installiert.

Jedenfalls hab ich keinen Eintrag mit phpinfo() gefunden.
 
Zurück