Hi,
nachdem ich ein loginsystem für eine app geschrieben habe, möchte ich nun gerne eine email zur bestätigung an die Adresse des Users schicken, jedoch scheint dies schwieriger als gedacht ;ugl
php.ini
logs:
Ich glaube, dass es an meiner dns liegt, dass es fehl schlägt, allerdings komme ich damit nicht so ganz klar und habe das gefühl, dass ich es eher verschlimm-bessere.
liebe Grüße und Danke für die Hilfe :)
nachdem ich ein loginsystem für eine app geschrieben habe, möchte ich nun gerne eine email zur bestätigung an die Adresse des Users schicken, jedoch scheint dies schwieriger als gedacht ;ugl
PHP:
<html> <head> <title>PHP mail() test</title> </head> <body>
<?php> $boundary = uniqid('np'); $headers = "MIME-Version: 1.0\r\n"; $headers .= "From: Phibedy <[email protected]>\r\n";
$headers .= "Subject: Test Message\r\n"; $headers .= "Content-Type: multipart/alternative;boundary=" . $boundary . "\r\n";
$to = "[email protected]";
$subject = "Test Message";
$message = "This is a MIME encoded message."; $message .= "\r\n\r\n--" . $boundary . "\r\n"; $message .= "Content-type: text/plain;charset=utf-8\r\n\r\n"; $message .= "This is the text/plain version.";
$message .= "\r\n\r\n--" . $boundary . "\r\n"; $message .= "Content-type: text/html;charset=utf-8\r\n\r\n"; $message .= "This is the <b>text/html</b> version.";
$message .= "\r\n\r\n--" . $boundary . "--";
if(mail($to,$subject,$message)){ echo "email successfully sent";
} ?> </body></html>
php.ini
Code:
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = [email protected]
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path = /usr/local/bin/phpsendmail
default: "sendmail -t -i"
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
; Log all mail() calls including the full path of the script, line #, to address and headers
;mail.log =
logs:
Code:
############
//mail.info
############
Mar 3 11:58:47 Debian-60-squeeze-64-LAMP qmail-queue-handlers[13954]: Handlers Filter before-queue for qmail started ...
Mar 3 11:58:47 Debian-60-squeeze-64-LAMP qmail-queue-handlers[13954]: from[URL="http://piratepad.net/ep/[email protected]"][email protected][/URL]
Mar 3 11:58:47 Debian-60-squeeze-64-LAMP qmail-queue-handlers[13954]: to[URL="http://piratepad.net/ep/[email protected]"][email protected][/URL]
############
//mail.log
############
Mar 3 11:58:47 Debian-60-squeeze-64-LAMP qmail-queue-handlers[13954]: Handlers Filter before-queue for qmail started ...
Mar 3 11:58:47 Debian-60-squeeze-64-LAMP qmail-queue-handlers[13954]: from[URL="http://piratepad.net/ep/[email protected]"][email protected][/URL]
Mar 3 11:58:47 Debian-60-squeeze-64-LAMP qmail-queue-handlers[13954]: to[URL="http://piratepad.net/ep/[email protected]"][email protected][/URL]
Mar 3 11:58:47 Debian-60-squeeze-64-LAMP qmail-queue-handlers[13954]: hook_dir = '/opt/psa/handlers/before-queue'
Mar 3 11:58:47 Debian-60-squeeze-64-LAMP qmail-queue-handlers[13954]: recipient[3] = '[email protected]'
Mar 3 11:58:47 Debian-60-squeeze-64-LAMP qmail-queue-handlers[13954]: handlers dir = '/opt/psa/handlers/before-queue/recipient/[email protected]'
Mar 3 11:58:47 Debian-60-squeeze-64-LAMP qmail-queue-handlers[13954]: starter: submitter[13956] exited normally
Ich glaube, dass es an meiner dns liegt, dass es fehl schlägt, allerdings komme ich damit nicht so ganz klar und habe das gefühl, dass ich es eher verschlimm-bessere.
liebe Grüße und Danke für die Hilfe :)