email (javamail) not getting sent from mobile device..
I can't understand what's happening here..
I have a typical simple contact form... when I test in my mac, on FF or Safari, email gets sent fine..
but on iPhone email does not get sent... I have conventional set up -- submit with submit button, action is JSP that sends email.. (I know this is not most desirable way, but it's worked fine for years, and it's for my personal website, not a lot of traffic, very few "real" emails get sent, no db involved...)
works fine in browsers in computer, but on iPhone email does not get sent... :-(
(I have email code inside a try-block, but no error gets printed....)
Well does the email show in the logs when you successfully send it using a different browser? I ask this because maybe the action isn't being logged or your reviewing the wrong logs.
I'm not a java developer, but I would print or echo a debugging statement, possibly stop execution inside the try block. Then attempt to load the page on your iPhone. This should confirm for you whether or not the mail function is being fired. You can debug from there.
ok, asked my hosting guy, he said turn Tomact off and on, which I did, now see the new logs, but nothing in there about why email is not getting sent when I try sending it from iPhone...
this is just so weird.. have tried again and again.. email gets sent when am in browser, but in iPhone, exact same contact form, same url, same code to send email.. email does not get sent (or gets sent and gets lost in the way...)
the fact that no error from try-block prints is even more mystifying.....
ok, this is working now.. this was very very very weird..
I was validating first (client-side) and for some reason it wasn't connecting to the valdation.js.. I put an alert to test and then it did... I know this sounds exceedingly bizarre, but this is what it was.. for some reason the validation wasn't coming thru..
(actually, even though I was testing at first with traditional methods, I actually connect to the server with ajax.. so am wrapping the ajax-call in an if-validate conditional, the ajax connects to the send-mail JSP (and I send params thru ajax, on success I hide the form and print ty-msg, etc), but for some very odd reason it was just not connecting to the validation.js (diff file from where ajax code is) UNTIL I put an alert in it.. then it worked.. then I removed alert, and now it works.. again, I know this sounds really really weird, but this is what happened... (am hoping it will still work tomorrow...;-)
just one of those truly bizarre things that happen every once in a while.. that make the life of the developer so interesting.... ;-)
this email-sending on the mobile is turning out to be quite a handful...
it's not sending emails from the iPhone again.....
when I test the exact same code am using in mobile in a conventional browser, email gets sent fine, but in iPhone emails just don't get sent....
(at least they're not arriving @ their destination.... ;-)
(and yes, checked spam folder in gmail webmail..)