|
|
|
|
|
|
|||||||
| PHP-Fortgeschrittene Arbeiten mit PHP ohne Einschränkungen |
|
|
|
LinkBack | Themen-Optionen | Thema bewerten |
|
|
#1 (permalink) |
|
Gast
Beiträge: n/a
|
Hallo Leute,
Ich habe ein Problem beim autmatischen versenden von E-Mails mit PDF als Dateianhang Der Server ist bei Schlund und komischer weise kommt die datei ohne mailanhang an .... und auch ohne Datei hier mal der Code Code:
$boundary = strtoupper(md5(uniqid(time()))); $mail_header = "From:buchhaltung@auftragshaus.de\n"; $mail_header .= "MIME-Version: 1.0"; $mail_header .= "\nContent-Type: multipart/aternative; boundary=$boundary"; $mail_header .= "\n\nThis is a multi-part message in MIME format -- Dies ist eine mehrteilige Nachricht im MIME-Format"; $mail_header .= "\n--$boundary"; $mail_header .= "\nContent-Type: text/plain"; $mail_header .= "\nContent-Transfer-Encoding: 8bit"; [/quote] $mail_header .= "\n\n$mailtext"; $file_content = fread(fopen($filename,"r"),filesize($filename)); $file_content = chunk_split(base64_encode($file_content)); $mail_header .= "\n--$boundary"; $mail_header .= "\nContent-Type: application/pdf; name=\"$filename\""; $mail_header .= "\nContent-Transfer-Encoding: base64"; $mail_header .= "\nContent-Disposition: attachment; filename=\"$filename\""; $mail_header .= "\n\n$file_content"; $mail_header .= "\n--$boundary--"; ![]() |
|
|
|
|
|
PHP Code Flüsterer
Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten
|
|
|
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| mail header | notyyy | PHP Tipps 2006 | 5 | 05.12.2006 19:30 |
| php oder css problem? Wie konfiguriere ich mail header | PHP Tipps 2006 | 1 | 28.02.2006 05:43 | |
| [Erledigt] Mail Anhang decodieren | PHP-Fortgeschrittene | 3 | 30.01.2006 22:53 | |
| Buchstabensuppe bei mail mit Anhang | PHP Tipps 2005-2 | 3 | 18.07.2005 14:31 | |
| problem bei mail() mit anhang | kid01 | PHP Tipps 2005 | 7 | 16.05.2005 21:19 |
| mail mit anhang | PHP Tipps 2005 | 1 | 06.05.2005 20:52 | |
| [Erledigt] php mail() header & Spam Problem | PHP-Fortgeschrittene | 4 | 04.05.2005 12:31 | |
| bitte um hilfe wegen cookie() und header() | d4rki | PHP Tipps 2005 | 2 | 21.04.2005 19:45 |
| mail() header herausfinden | PHP-Fortgeschrittene | 4 | 16.01.2005 23:26 | |
| mail () Datei Anhang | socke | PHP Tipps 2005 | 2 | 08.01.2005 13:08 |
| Mail mit Anhang / Kein Inhalt!? | PHP Tipps 2004 | 20 | 15.10.2004 12:37 | |
| mail() mit *.txt Anhang funktioniert nicht ganz... | 18inch | PHP Tipps 2004 | 7 | 12.10.2004 11:47 |
| mail() - mail header | PHP-Fortgeschrittene | 2 | 28.09.2004 15:35 | |
| Mail Problem mit Anhang | Spyker | PHP-Fortgeschrittene | 2 | 21.09.2004 21:41 |
| Formular mit mail() verschicken ?! bitte um Hilfe | PHP Tipps 2004 | 48 | 11.07.2004 19:46 | |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.