![]() |
idhttp post problem
hi leute ..ich dreh hier gleich ab ich möchte per http post eine email über eine php verschicken:
Delphi-Quellcode:
es kommt einfach nichts an ..aber ich bekomme auch keinen fehler und wenn ich in der php get statt post mache und die im browser aufrufe, geht alles !
<?
mail($_POST['email'], $_POST['subject'], $_POST['message'], "from: " . $_POST['sender']); ?> var ParamData : TStringStream; begin Sendhttp.HandleRedirects:=true; ParamData := TStringStream.Create(''); ParamData.WriteString('email=' + sendMailAddy ); ParamData.WriteString('subject=' + txtsubject.Text); ParamData.WriteString('message=' + txtmessage.text); ParamData.WriteString('sender=absender@fmhg.de'); try txtmessage.text := SendHTTP.Post('http://atmail.php', ParamData); statusbar.Panels[0].Text := 'Status: eMail gesendet..'; finally ParamData.Free; end; |
Re: idhttp post problem
Was kommt den im Skript an?
|
Re: idhttp post problem
wie kann ich mir das ausgeben lassen ?
|
Re: idhttp post problem
echo($_POST['email']) ?
|
Re: idhttp post problem
ja, das dachte ich auch und dann müsste ich ja in message.text was zurück bekommen aber da steht nichts..muss hinter das .php noch ein '?' ? nein geht auch nicht..
|
Re: idhttp post problem
Und wenn du statt einem StringStream den Indy-eigenen TIdMultiPartFormData(oder so ähnlich) Stream nimmst?
|
Re: idhttp post problem
glaube nicht das es daran liegt ... vll lieg es am proxy ...ich werde nochmal weiter suchen
|
Re: idhttp post problem
Müssen die einzelnen Parameter evtl. durch #13#10 oder & getrennt werden? (hab gerade keine Möglichkeit, das festzustellen)
/edit: Wofür gibt's Wireshark
Code:
Content-Type: multipart/form-data; boundary=---------------------------6430211613648
Content-Length: 1735 -----------------------------6430211613648 Content-Disposition: form-data; name="subject" Re: idhttp post problem -----------------------------6430211613648 Content-Disposition: form-data; name="helpbox" URL einf.gen: [URL]http://url[/URL] or [URL=http://url]URL text[/URL] -----------------------------6430211613648 Content-Disposition: form-data; name="message" M.ssen die einzelnen Parameter evtl. durch #13#10 oder & getrennt werden? (hab gerade keine M.glichkeit, das festzustellen) -----------------------------6430211613648 Content-Disposition: form-data; name="attach_sig" on -----------------------------6430211613648 Content-Disposition: form-data; name="notify" on -----------------------------6430211613648 Content-Disposition: form-data; name="add_attachment_body" 0 -----------------------------6430211613648 Content-Disposition: form-data; name="posted_attachments_body" 0 -----------------------------6430211613648 Content-Disposition: form-data; name="fileupload"; filename="" Content-Type: application/octet-stream -----------------------------6430211613648 Content-Disposition: form-data; name="filecomment" -----------------------------6430211613648 Content-Disposition: form-data; name="mode" reply -----------------------------6430211613648 Content-Disposition: form-data; name="t" 117276 -----------------------------6430211613648 Content-Disposition: form-data; name="sets" 1188372289 -----------------------------6430211613648 Content-Disposition: form-data; name="last_newpost_reminder_time" 0 -----------------------------6430211613648 Content-Disposition: form-data; name="post" Absenden -----------------------------6430211613648-- |
Re: idhttp post problem
Zitat:
|
Re: idhttp post problem
Zitat:
Zitat:
wollte hierzu nur nochmal kurz sagen ...ja stimmt ...es geht:
Delphi-Quellcode:
Uses IdMultipartFormData;
var data: TIdMultiPartFormDataStream; begin data := TIdMultiPartFormDataStream.Create; data.AddFormField('email', sendMailAddy); data.AddFormField('subject', txtsubject.Text); data.AddFormField('message', txtmessage.text); data.AddFormField('sender', 'support@fuck-ass.tv'); try test.text := SendHTTP.POST('http://atmail.php' , data); |
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:35 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz