(Gast)
n/a Beiträge
|
Re: Email über php Script versenden
8. Feb 2004, 12:23
So:
PHP Script!
Code:
<?php
mail("$zu","$betreff","
$text",
"From: $von
Content-Type: text/ html");
?>
und dann hiermit senden!
Delphi-Quellcode:
uses IdMultipartFormData;
{ .... }
procedure TForm1.Button1Click(Sender: TObject);
var
data: TIdMultiPartFormDataStream;
begin
data := TIdMultiPartFormDataStream.Create;
try
{ add the used parameters for the script }
data.AddFormField(' zu', ' test@domain.de');
data.AddFormField(' betreff', ' jo funktioniert');
data.AddFormField(' text', ' Hallo, test erfolgreich');
data.AddFormField(' von', ' matze@matze.de');
{ Call the Post method of TIdHTTP and read the result into TMemo }
Memo1.Lines.Text := IdHTTP1.Post(' http://localhost/script.php', data);
finally
data.Free;
end;
end;
gruß
synonym
P.S. Du darfst das nicht vergessen!
|
|
Zitat
|