php - email via server -


I have an app where people can fill some data and send it to my email, mail is sent and Works fine except that the body of mail is empty.

My method for the connection:

  - (zero) ActionShop: (UIActionSheet *) Action sheet did the DISISM with distribution index: (NSITAZ) button index {if ( ! (Button Index == [Cancel Action Sheet Button Index])) {NSString * post = nil; Post = [[NSString alloc] initWithFormat: @ "name spell =% @ Uitleg =% @", spelnaam.text, Uitleg.text]; NSLog (@ "DIT Word Vertyurud% @", Post); //works fine! NSDTA * PostData = [Post Data Usage Encoding: NSSEIITITING Encoding Permission Loansy Conversion: Yes]; NSString * postLength = [NSString stringWithFormat: @ "% d", [PostData Length]]; NSMutableURLRequest * Request = [[[NSMutableURLRequest alloc] init] autorelease]; [Request Set URL: [NSD URL URL with string: @ "http://www.myserver.nl/theemailfile.php"]]; [Set http system: @ "post"]; [Set set property: post length for http header field: @ "content-length"]; [Request Set Value: @ "App / X-www-Form-URLXode" forHTTPHeaderField: @ "Content-Type"]; [Set http: bb: postdata]; [Request with NSR connection connection: request representative: self]; [post release]; [Self displayAlert]; }}   

My php file:

  & lt ;? Php $ message = $ _REQUEST ['message']; Mail ("emailadres@gmail.com", "test message", $ message); ? & Gt;    

In your HTTP request, you are saying that the information you are sending The main type of request is application / x-www-form-urlencoded , although this is not the case. It appears that this is just free form text. You should be conforming to this: You are sending a message:

  name spel = test Uitleg = test   

You need to send something like this:

  Message = this + one + test and other = test    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -