• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Versand von SMTP-Mails mit php in 1&1

AS04

Neues Mitglied
Hallo Gemeinschaft,

hat schon mal jemand einen SMTP-Mail-Versand (Newsletter, mehrere Empfänger) für ein 1&1-Konto realisiert und kann mir weiterhelfen?

Mein php-Mailer läuft mit php mail() und versagt bei smtp. Der ganze Quelltext ist zu lang, deshalb hier der Auszug der meines Erachtens betreffenden Einstellungen:

PHP:
/**
   * Method to send mail: ("mail", "sendmail", or "smtp").
   * @var string
   */
  var $Mailer            = 'smtp';
  /**
   * Sets the path of the sendmail program.
   * @var string
   */
  var $Sendmail          = '/usr/sbin/sendmail';
  /**
   * Path to PHPMailer plugins.  This is now only useful if the SMTP class
   * is in a different directory than the PHP include path.
   * @var string
   */
  var $PluginDir         = '';
  /**
   * Holds PHPMailer version.
   * @var string
   */
  var $Version           = "2.0.4";
  /**
   * Sets the email address that a reading confirmation will be sent.
   * @var string
   */
  var $ConfirmReadingTo  = '[email protected]';
  /**
   * Sets the hostname to use in Message-Id and Received headers
   * and as default HELO string. If empty, the value returned
   * by SERVER_NAME is used or 'localhost.localdomain'.
   * @var string
   */
  var $Hostname          = '';
  /**
   * Sets the message ID to be used in the Message-Id header.
   * If empty, a unique id will be generated.
   * @var string
   */
  var $MessageID         = '';
  /////////////////////////////////////////////////
  // PROPERTIES FOR SMTP
  /////////////////////////////////////////////////
  /**
   * Sets the SMTP hosts.  All hosts must be separated by a
   * semicolon.  You can also specify a different port
   * for each host by using this format: [hostname:port]
   * (e.g. "smtp1.example.com:25;smtp2.example.com").
   * Hosts will be tried in order.
   * @var string
   */
  var $Host        = 'smtp.1und1.de';
  /**
   * Sets the default SMTP server port.
   * @var int
   */
  var $Port        = 25;
  /**
   * Sets the SMTP HELO of the message (Default is $Hostname).
   * @var string
   */
  var $Helo        = '';
  /**
   * Sets connection prefix.
   * Options are "", "ssl" or "tls"
   * @var string
   */
  var $SMTPSecure = "";
  /**
   * Sets SMTP authentication. Utilizes the Username and Password variables.
   * @var bool
   */
  var $SMTPAuth     = false;
  /**
   * Sets SMTP username.
   * @var string
   */
  var $Username     = '[email protected]';
  /**
   * Sets SMTP password.
   * @var string
   */
  var $Password     = 'meinpasswort';
  /**
   * Sets the SMTP server timeout in seconds. This function will not
   * work with the win32 version.
   * @var int
   */
  var $Timeout      = 10;
  /**
   * Sets SMTP class debugging on or off.
   * @var bool
   */
  var $SMTPDebug    = false;
  /**
   * Prevents the SMTP connection from being closed after each mail
   * sending.  If this is set to true then to close the connection
   * requires an explicit call to SmtpClose().
   * @var bool
   */
  var $SMTPKeepAlive = false;
  /**
   * Provides the ability to have the TO field process individual
   * emails, instead of sending to entire TO addresses
   * @var bool
   */
  var $SingleTo = false;

Wäre toll, wenn mir jemand helfen könnte. Vielen Dank im Voraus.
 
Sorry, habe vergessen, an der Stelle etwas ausführlicher zu werden:<BR><BR>
Nein, sicher nicht. Aber es gibt wie gesagt viele Alternativen. Z.B. <A href="http://sourceforge.net/projects/phpmailer/" target=_blank>phpmailer</A>.
<BR><BR>Habe ich mir besorgt, Resultat:<BR>Der phpmailer läuft auf 1&amp;1 einwandfrei wenn ich den Versand mit php mail () vorgebe. Mit der gleichen Syntax und der Anwahl von smtp mit o.g. Parametern kommt die Fehlermeldung:<BR><BR>
Code:
Mailer Error: SMTP Error: Could not connect to SMTP host.
<BR><BR>Hab jetzt<BR>
Code:
var $SMTPSecure = "ssl";<BR>var $SMTPAuth &nbsp; &nbsp; = true;
<BR>gesetzt, bringt aber nix. Und jetzt bin ich mit meinem extrem Kleinen Latinum am Ende.
 
Liegt dein Webspace auch bei 1und1?
Wenn nein, könnte es sein, dass 1und1 verhindert, dass man von extern auch darüber senken kann.
Wenn ja, dann solltest Du dich an 1und1 als deinen Hoster wenden.
 
Ersteres ist der Fall und für Zweites danke. Irgendwie muss es wohl funktionieren. In Beiträgen bei 1und1 hab ich gelesen, dass zum Beispiel nur 30 cc's je Mail versendet werden können, smtp aber grundsätzlich geht. Ich denke, dass wenn sowohl der Webspace als auch Mail-Adressen bei 1und1 angelegt sind, die Sache eigentlich flutschen müsste.
 
Danke Dir. Dachte ich hätte das gelesen, wohl nicht intensiv genug. Muss ich die Details noch mal durchprobieren.
 
Zurück
Oben