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… :frowning:
(I have email code inside a try-block, but no error gets printed…)

would appreciate suggestions…

thank you…

Have you confirmed that the email function in the try block is being fired? Placed some debugging messages in there?

What about the mail server log? Do you see the mail being sent or attempting to be sent from there?

There’s nothing different (to the best of my knowledge) from the Safari browser on iOS as there is on OS X that would cause a jsp page not to load completely.

last night I tried looking at the logs… there are so may logs… :wink: (logs in there going back to 2010… wonder if there’s a way to autom. remove old logs… )
so I removed all logs…

when try to send email now no logs get created (this is on Tomcat, 5.5, I think… I have never seen specific logs just for email…)

in addition to wrapping email code in a try-block, what other debugging code could I put in there??

thank you…

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.

again, I removed all logs… only log there now is wrapper.log, it’s the same as before, has stuff in there from 2010… nothing from 2012…

there’s only one “logs” dir in Tomcat… all logs are there, am not aware of any logs anywhere else…

continuing to investigate… thank you for your help…

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…

oh brother… :frowning:

thank you…

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…:wink:

just one of those truly bizarre things that happen every once in a while… that make the life of the developer so interesting… :wink:

thank you…

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… :wink:
(and yes, checked spam folder in gmail webmail…)

yikes…