Can't send attachment to Admin Email

90 views
Skip to first unread message

Larry

unread,
May 18, 2012, 12:38:42 AM5/18/12
to google-a...@googlegroups.com
Hi All,
Ā  Ā  Ā I fail to send email to admins of app.
Ā  Ā  Ā Here is my codeĀ 

Ā  Ā  Ā MailService mailService = MailServiceFactory.getMailService();
Ā  Ā  Ā Message message = new Message();
Ā  Ā  Ā message.setSender("xx...@gmail.com");
Ā  Ā  Ā message.setSubject("This is test");
Ā  Ā  Ā message.setHtmlBody("this is <b>content</b>");
Ā  Ā  Ā Attachment attachment = new Attachment("test.pdf", blob.getBytes()); // blob size = 488k
Ā  Ā  Ā message.setAttachments(attachment);
Ā  Ā  Ā mailService.sendToAdmins(message);

Ā  Ā  Ā In the Logs ofĀ Administration Console, a warning:
Ā  Ā  Bad Request: Admin message exceeds size limits

Ā  Ā here is the detail quota:

Mail

Mail API Calls
0%
0%0 of 7,000Okay
Recipients Emailed
0%
0%0 of 100Okay
Admins Emailed
0%
0%0 of 5,000Okay
Message Body Data Sent
0%
0%0.00 of 0.06 GBytesOkay
Attachments Sent
0%
0%0.00 of 0.00 GBytesOkay
Attachment Data Sent
0%
0%0.00 of 0.10 GBytesOkay
Ā Is it problem of Ā "Attachments Sent"? It should beĀ 2,000 attachments.
Ā Anybody can help me? Thank.


abdelkrim boujraf

unread,
May 18, 2012, 5:08:30 PM5/18/12
to google-a...@googlegroups.com
Can you send a message without the attachment?

Is the sender (email address) a developer or an owner of the application?

Abdelkrim


Le vendredi 18 mai 2012 06:38:42 UTC+2, Larry a écrit :
Hi All,
Ā  Ā  Ā I fail to send email to admins of app.
Ā  Ā  Ā Here is my codeĀ 

Ā  Ā  Ā MailService mailService = MailServiceFactory.getMailService();
Ā  Ā  Ā Message message = new Message();
Ā  Ā  Ā message.setSender("xxxx@gmail.com");

Larry

unread,
May 21, 2012, 1:55:41 AM5/21/12
to google-a...@googlegroups.com
Hi Abdelkrim,
Ā  Ā  I can send the email without the attachment.
And theĀ Admins Emailed quota increase.
The sender is the owner of the application.
PS I can send email with attachment by Javamail.
It is only 100Ā RecipientsĀ  only.



abdelkrim boujrafę–¼ 2012幓5月19ę—„ę˜ŸęœŸå…­UTC+8äøŠåˆ5Ꙃ08分30ē§’åÆ«é“ļ¼š

Larry

unread,
May 22, 2012, 11:09:55 PM5/22/12
to google-a...@googlegroups.com
Hi all,
Ā  Ā I have done a test by JavaMail as following.
1. send email with attachment to any email address=> success and increase the quota ofĀ Recipients Emailed
2. .change the recipient to admins from step 1 => fail.Exception:java.lang.IllegalArgumentException: Bad Request: Admin message exceeds size limits
3. remove the attachment from step 2.=> Success and increase the quota of admins emailed.

Could I conclude that Email to admins with attachments is forbidden?
I don't see any document about that.

Larryę–¼ 2012幓5月18ę—„ę˜ŸęœŸäŗ”UTC+8äø‹åˆ12Ꙃ38分42ē§’åÆ«é“ļ¼š
Hi All,
Ā  Ā  Ā I fail to send email to admins of app.
Ā  Ā  Ā Here is my codeĀ 

Ā  Ā  Ā MailService mailService = MailServiceFactory.getMailService();
Ā  Ā  Ā Message message = new Message();
Ā  Ā  Ā message.setSender("xxxx@gmail.com");

Larryę–¼ 2012幓5月18ę—„ę˜ŸęœŸäŗ”UTC+8äø‹åˆ12Ꙃ38分42ē§’åÆ«é“ļ¼š
Hi All,
Ā  Ā  Ā I fail to send email to admins of app.
Ā  Ā  Ā Here is my codeĀ 

Ā  Ā  Ā MailService mailService = MailServiceFactory.getMailService();
Ā  Ā  Ā Message message = new Message();
Ā  Ā  Ā message.setSender("xxxx@gmail.com");

Larryę–¼ 2012幓5月18ę—„ę˜ŸęœŸäŗ”UTC+8äø‹åˆ12Ꙃ38分42ē§’åÆ«é“ļ¼š
Hi All,
Ā  Ā  Ā I fail to send email to admins of app.
Ā  Ā  Ā Here is my codeĀ 

Ā  Ā  Ā MailService mailService = MailServiceFactory.getMailService();
Ā  Ā  Ā Message message = new Message();
Ā  Ā  Ā message.setSender("xxxx@gmail.com");
Reply all
Reply to author
Forward
0 new messages