[TYPO3-german] server und mailerver getrennt

Theo Klems theo.klems at adebes.de
Thu Mar 2 16:27:34 CET 2006


hallo,
seit der installation eines eigenständigen mailservers sollen sich 
web-formulare hier authentifizieren.. der folgende code soll dies 
ermöglichen. hat jemand erfahrungen damit, so etwas in typo3 einzubauen?

grüße, theo

<?php
$smtp_server = "smtp.acme.com";
$port = 25;
$mydomain = "acme.com";
$username = "user"; // MS Exchange servers will probably require a
valid NT domain name as part of the username.  E.g., "ntdomain\user"
$password = "password";
$sender = "me at acme.com";
$recipient = "joe at company.com";
$subject = "test";
$content = "test";

// Initiate connection with the SMTP server
$handle = fsockopen($smtp_server,$port);
fputs($handle, "EHLO $mydomain\r\n");

// SMTP authorization
fputs($handle, "AUTH LOGIN\r\n");
fputs($handle, base64_encode($username)."\r\n");
fputs($handle, base64_encode($password)."\r\n");

// Send out the e-mail
fputs($handle, "MAIL FROM:<$sender>\r\n");
fputs($handle, "RCPT TO:<$recipient>\r\n");
fputs($handle, "DATA\r\n");
fputs($handle, "To: $recipient\n");
fputs($handle, "Subject: $subject\n\n");
fputs($handle, "$content\r\n");
fputs($handle, ".\r\n");

// Close connection to SMTP server
fputs($handle, "QUIT\r\n");
?>



More information about the TYPO3-german mailing list