I am working on an android email client for my university email service. However, I have some troubles with attachments.Actually, I can get attachment from emails that are from gmail or other popular email services but I can't get attachments from emails that are from our university domain.
In gmail, it sends more than one body part in MimeMultipart (Message.getContent() returns MimeMultipart object) and I can get the attachments.
However, in my university email service send one BodyPart in MimeMultipart and it has only the text part of the message as plain and html.
Should I use extra command for obtain attachments?
This JavaMail FAQ entry might help.
Also, try the msgshow.java sample program. You can read the source code of the program to see it it finds the attachments, or you can use it with the "-s" option to show the structure of the message. If you can't figure it out, post the -s output here.
Related
Problem:
gMail rejects emails missing a "MessageID" header, and email originating from my Samsung phone does not include the MessageID header.
What I see:
Email originating from my phone's email app [Samsung email Version 6.1.72.1] does not include a message header (when using my private domain's SMTP server, parked at GoDaddy/SecureServer.Net). Therefore, eMail from me/myphone on that account, to any gMail user, is rejected by the Google servers with a 500/550 error, and bounced.
On my phone, other email with another domain includes a MessageID header. I had assumed that a SMTP server creates that globally unique ID; but since the MessageID does show up on those emails, I'm not sure.
Other Info:
eMails from my thunderbird client, sending through the same domain/SMTP, do include the MessageID
emails from my phone client, through another, second domain, do include the messageID
emails from the WebClient for SecureServer.Net do include the MessageID
deleting my domain email from the phone app, and recreating it, does not change anything
GoDaddy/ReSeller phone-help was not helpful. That first-layer help asserts that an escalation reported to him that: there is no SMTP server setting which can explain what's going on, and; the expectation is that their SMTP server creates all MessageID headers and puts them in all emails.
I am looking at the as-sent, raw emails by sending emails to my domain which I pick up on my Thunderbird.
I posted this issue on the Samsung help, and no one has answered. An earlier, similar question had a single answer, which was to ask Google at the google account help page. Not helpful, for me.
So, Questions:
Which application client or server is generating the MessageID line, and does email in "sent mail" include a MessageID because the client retrieves the MessageID from the SMTP server as part of the send process?
how do I force eMail, from my domain on my Samsung phone's email app, to include a MessageID ...
... so I can use my phone to write letters to gMail users
I had the same error, and was trying to get the messageId into my e-mails.
But the problem was not a wrong client or SMTP server, it was a missing "SPF record" in the DNS records of my domain.
Google changed policies for incoming e-mails, which now require an SPF record.
If you have access to the DNS records of the domain, try to add a TXT field with SPF information.
There are some details regarding SPF:
https://support.google.com/a/answer/33786?hl=en
https://www.validity.com/blog/how-to-build-your-spf-record-in-5-simple-steps/
I made a Python code that automatically sends mail.
The contents of the body in the mail were written in HTML format so that the mail could go at a specific time.
If you send an e-mail in the form of Text, the e-mail linked to Samsung e-mail (email service on Android phone) does not show the body. (When checked by Android phone, the attachment is sent normally, but the body is exposed in white.)
Conversely, when sending mail in the form of Html, the contents of the body are printed twice only in the groupware mail (PC).
(If you send it to the groupware mail, Naver mail, Daum mail, or Google mail registered in Samsung email, it will only be printed once.)
I don't understand at all the phenomena that are printed twice only in "Groupware PC" and that the text does not come out when printed in text form in Samsung e-mail, so what part should I check?
I want to put feedback option in android app as some apps do. I presently have this code
Intent Email = new Intent(Intent.ACTION_SEND);
Email.setType("text/email");
Email.putExtra(Intent.EXTRA_EMAIL, new String[] { "feedback#gmail.com" });
Email.putExtra(Intent.EXTRA_SUBJECT, "Feedback");
Email.putExtra(Intent.EXTRA_TEXT, "Hi");
startActivity(Intent.createChooser(Email, "Sending Feedback:"));
But this code redirects to default app. As I don't want to show to address, I came to know that it is not possible with default in-built email app.
Later thought to implement using java api, so that I can hardcode my mail credentials(including username, password) and send it to the mail that I specify. So that user doesn't need to log in. Just he mentions his mail address in the given column, message. That's it. Then after clicking on send button, it should go the feedback mail id. But this is risky if some one converts my apk into source code as they would come to know my credentials that I used for this feedback. Can some one please suggest me how to implement this in a correct way so that user need not have any credentials or mail app?
Sending mail from php:
<?php
$to = "recipient#example.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<p>Email successfully sent!</p>");
} else {
echo("<p>Email delivery failed…</p>");
}
?>
An alternative way of hiding you data will be to post it to a server, i.e you may try considering posting your feedback data to some php script or a servlet, which later on forwards it to your mailbox.
There are so many free hostings out there, one I use for same purpose is www.3owl.com, I just have a PHP file there, and all the responses and feedbacks from all the websites are submitted there, which are then forwarded to my mailing address.
And, about mails going to Spam, well mailbox are intelligent these days, they can be taught what is not a spam, and what is :)
You could consider adding a separate API altogether and use their online client to view and manage the messages you receive:
Apptentive
LetThemVote
Recon Instruments
i am using the default email app that come with ics, and i want to catch the email recieving programatically (i want to recieve and sender information and the email body itself), how can i do it? i tried search however i only find how to send email and how to recieve email in gmail (which is not my case)
thanks
Unfortunately, there is no way to "catch" emails as they come to the phone. You'll have to manually connect to the mail server and download the emails. If you're interested in doing that, I've used the javamail-android port, which actually is pretty fully featured.
I am new to android. I configured the email address in the android emulator.I want to get the email content,if the configured email receives the mail from other mailid.which notification shall i use and how to get the email content when the notification raises the alert. how can i achieve this.
Thanks in advance.....
It sounds to me like you're trying to say that you signed-in to the mail app on the Android device. From my understanding of the question you've raise, signing-in to an email account on the Android device doesn't mean any application can just grab emails from it. The closest solution I can think of is creating an IMAP connection to a mail server to grab mail content.