Smpt,Mercury sendet keine Emails über Phpscript?

Irgendwelche Probleme mit XAMPP für Windows? Dann ist hier genau der richtige Ort um nachzufragen.

Smpt,Mercury sendet keine Emails über Phpscript?

Postby tommyboy » 22. February 2005 09:05

Hallo Leute,

ich möchte mit meinem Phpscript emails via Smpt verschicken.
Ich habe im Pfad C:\xampp\apache\bin\php.ini das Semikolon
vor dem Ausdruck extension=php_sockets.dll entfernt.
Ich habe dem Admin in Mercury ein Passwort vergeben, dass
stimmt auch mit meinem Phpscriptpasswort überein? Wenn ich
aber eine Email aus der Oberfläche von Mercury sende, dann
verschickt er diese Email auch. Nur wenn ich in meinem Phpscript
eine Email absenden möchte kommt eine Fehlermeldung (Siehe unten).

Da aber immernoch eine Fehlermeldung kommt ,meine Frage:

->An welche weiteren ini-Dateien od. Argumente muß ich was,wie und wo anpassen?
->Muß ich etwas in Mercury einstellen damit ich auf den SMPT zugreifen kann?
->Muß ich etwas zusätzlich installieren, ich benutze Xampp für Windows

Fehlermeldung
Code: Select all
Unable to send e-mail to admin@localhost. unable to authenticate to smtp server on


Aufruf zum Email senden mit Hilfe der PEAR-Klassenbibliothek
Code: Select all
 public function Mail($params, $to, $headers, $message)
  {                                           
    // Create the mail object using the Mail::factory method
    $mail_object = Mail::factory('smtp', $params);
    // Test the mail object is valid           
    if (PEAR::isError($mail_object))           
       throw new Exception($mail_object->getMessage());
    // sends email                             
    $result = $mail_object->send($to, $headers, $message);
    // Test if mail was sent successfully     
    if (PEAR::isError($result)) 
       throw new Exception("Unable to send e-mail to $to. " .
                             $result->getMessage());
  }             



Bitte helft mir ich bin kurz vorm verzweifeln!

Mfg
Tommyboy
tommyboy
 
Posts: 71
Joined: 18. July 2004 10:44
Location: Stuttgart-Tübingen

Postby deepsurfer » 22. February 2005 09:08

User avatar
deepsurfer
AF Moderator
 
Posts: 6440
Joined: 23. November 2004 10:44
Location: Cologne
Operating System: Win-XP / Win7 / Linux -Debian

Postby tommyboy » 22. February 2005 09:39

Och man nicht schon wieder dieses PDF????

Ich habe Mercury schon eingestellt!
Hier die Daten die ich unter Smpt Server eingestellt habe.
Reiter Generel
Announce Myself as: localhost
Display session progress and debugging information: Hacken

Reiter Connection Control
Do not permit SMPT relaying on non local mail: Hacken
Authenticated Smpt connections may relay mail: Hacken

Hier die Daten die ich unter Smpt Client eingestellt habe.
Reiter General
Identity Myself as: localhost

Wie gesagt über das UserInterface von Mercury, kann ich Emails verschicken das funktioniert nur nicht von meinem Phpscript!!!!!!
Ich vermute vielleicht muß ich noch etwas an meiner ini einstellen oder so? Sind die Parameter denn Richtig eingestellt?? Wenn ich von meinem Phpscript eine Email an Admin@localhost versenden möchte???

Mfg
Tommyboy
tommyboy
 
Posts: 71
Joined: 18. July 2004 10:44
Location: Stuttgart-Tübingen

Postby deepsurfer » 22. February 2005 09:59

Och man nicht schon wieder dieses PDF????


-- nur zur anmerkung.... wie in dem Text zu lesen ist es auch schon eine neue fassung.

-- hättest du in deiner Fragestellung/Fehlerbericht erwähnt das du dieses PDF schon gelesen hast, dann hätte ich auch dieses PDF nicht als möglichen Lösungsweg hier reingesetzt.

chirio
Deep
User avatar
deepsurfer
AF Moderator
 
Posts: 6440
Joined: 23. November 2004 10:44
Location: Cologne
Operating System: Win-XP / Win7 / Linux -Debian

Postby Knappe » 22. February 2005 10:02

Vielleicht ein Hilfestellung :

Versuche doch einmal eine Mail von Deinem normalen E-Mail-Client an den Mercury-Server zu senden und prüfe mal, ob diese dort auch ankommt.

Vielleicht stimmen nur Deine Namen nicht ?
Knappe
 
Posts: 114
Joined: 18. November 2004 17:40

Postby Wiedmann » 22. February 2005 10:10

Wenn man diese Fehlermeldung, in der Anleitung der Klasse die du benutzt, nachschlägt, solltest du mal den Inhalt von $params überprüfen.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby tommyboy » 22. February 2005 10:20

Hi Wiedmann,

ich habe eine Variable die ich der Send Methode übergebe.

Hier ist meine Configuration:
Code: Select all
define("ADMIN_EMAIL","postmaster@localhost");
$admin_email_params=array('host' => 'localhost',
                          'auth' => true,
                          'username' => 'postmaster',
                          'password' => 'hjilo2');


Habe ich hier etwas falsch gemacht?

Mfg
Tommyboy
tommyboy
 
Posts: 71
Joined: 18. July 2004 10:44
Location: Stuttgart-Tübingen

Postby Wiedmann » 22. February 2005 11:14

a) du hast im Mercury einen Benutzer mit dem Namen "postmaster" und dem Passwort "hjilo2"?

b) du bist sicher, dass der Inhalt der Variablen "$admin_email_params" auch in der Methode Mail deiner Klasse in der Variablen $params ankommt?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby tommyboy » 22. February 2005 11:54

Hallo Wiedmann,

ich habe in der Funktion den $params abgefragt.

Code: Select all
public function Mail($params, $to, $headers, $message)
  {     
  // Looking into the Array to prove the Arrayvariables
         echo $params['host'] . ";";
         echo $params['auth']. ";";
         echo $params['username']. ";";
         echo $params['password']. ";";                             
    // Create the mail object using the Mail::factory method
    $mail_object = Mail::factory('smtp', $params);
    // Test the mail object is valid           
    if (PEAR::isError($mail_object))           
       throw new Exception($mail_object->getMessage());
    // sends email                             
    $result = $mail_object->send($to, $headers, $message);
    // Test if mail was sent successfully     
    if (PEAR::isError($result)) 
       throw new Exception("Unable to send e-mail to $to " .
                             $result->getMessage());


Nun gibt es folgende Errormessage:
Code: Select all
 localhost;1;postmaster;hjilo2;Unable to send e-mail to postmaster@localhost unable to authenticate to smtp server on


Also meine Parameter in dem $params kommen alle richtig an.
Ich habe den postmaster in Mercury nicht großartig konfiguriert, da
er ja schon standartmäßig konfiguriert war, habe ihm nur das Passwort
vergeben. Muß ich etwas in der ini Datei des Apachen einstellen oder sonst wo?

Wenn ich Mercury ausschalte dann kommt folgende Fehlermeldung.
Code: Select all
localhost;1;postmaster;hjilo2;Unable to send e-mail to postmaster@localhost unable to connect to smtp server localhost:25 on
tommyboy
 
Posts: 71
Joined: 18. July 2004 10:44
Location: Stuttgart-Tübingen

Postby Wiedmann » 22. February 2005 12:07

Tjo... mit diesen Daten kann sich das Script jedenfalls nicht am Mercury anmelden.

Kannst du denn mit denen über OE Mails versenden?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby tommyboy » 22. February 2005 12:12

Wenn du mir sagst was eine OE ist dann gerne *grins*

Mfg
Tommyboy
tommyboy
 
Posts: 71
Joined: 18. July 2004 10:44
Location: Stuttgart-Tübingen

Postby Wiedmann » 22. February 2005 12:18

OE = Outlook Express

oder halt ein anderer, von dir bevorzugter, Mailclient.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby tommyboy » 22. February 2005 12:44

Ich habe einen neuen user "tommy" in mercury erstellt.Ich wollte von dem OE aus eine Email an diesen Schicken aber es kam ein MailDeamon.
Komisch von Admin to localhost kann ich senden?

Jetzt bilicke ich es garnicht mehr

Mfg
Tommyboy
tommyboy
 
Posts: 71
Joined: 18. July 2004 10:44
Location: Stuttgart-Tübingen

Postby Wiedmann » 22. February 2005 12:53

Komisch von Admin to localhost kann ich senden?

Das geht sicher nicht.... oder du drückst dich falsch aus.

BTW:
solange du mit OE keine Mails verschicken kannst, brauchst du es mit PHP erst gar nicht versuchen.

Muss es denn eigentlich ein eigener Mailserver sein?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby tommyboy » 22. February 2005 13:04

Ja es muss sein, ich mache eine Homepage und ich möchte diese hier ausprobieren. Und zwar wenn ein Fehler auftritt, dann wird die entsprechende Errormessage an postmaster@local geschickt.Und ich komme nicht vorran wegen diesem Fehler mist.

Du hattest recht ich kann keine Emails über OE an andere user in mercury versenden.
Ich würde gerne von Null anfangen also ne ini Konfigurieren usw.
und dann, sollte es endlich mal gehen. Wiso geht der Mailserver bei andern und bei mir nicht???
Wenn ich ne gute Anleitung bekommen könnte :idea:

Mfg

Tommyboy
tommyboy
 
Posts: 71
Joined: 18. July 2004 10:44
Location: Stuttgart-Tübingen


Return to XAMPP für Windows

Who is online

Users browsing this forum: No registered users and 11 guests