Android Question SMTP - Send PDF with Content-Type error

cocale2001

Member
Licensed User
Hi .i use SMTP lib.
Sending a message with an attached PDF file . In the mailbox I get the message with the PDF file encoded in base 64 and unreadable
I think is the wrong Content- Type. Is it possible to force the Content-Type right?
See the example below:

***************************************************
This is a boby and is OK
***************************************************
--asdasdwdwqd__HV_qwdqwdddwq
Content-Type: text/plain; charset="utf-8"

Invio rapporto BM2 nr 46 del 25/05/2015
Terminale: 002
Codice tecnico: 02(Palmare02)

Intervento eseguito presso:
FERRARI S.R.L.
VIA GRANDI,29
RA RAVENNA 48123
In allegato è presente il rapporto nel formato PDF

***************************************************
This is a PDF attachment encoded to base64
***************************************************
--asdasdwdwqd__HV_qwdqwdddwq
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="rap_BM2_46_20150525.pdf"

JVBERi0xLjQKJam7qrUKMSAwIG9iago8PAogIC9UeXBlIC9DYXRhbG9nCiAgL1BhZ2VzIDIgMCBS
Cj4+CmVuZG9iagoKMiAwIG9iago8PAogIC9UeXBlIC9QYWdlcwogIC9NZWRpYUJveCBbIDAgMCA1
OTUgODQyIF0KICAvQ291bnQgMQogIC9LaWRzIFsgMyAwIFIgXQo+PgplbmRvYmoKCjMgMCBvYmoK
PDwKICAvVHlwZSAvUGFnZQogIC9QYXJlbnQgMiAwIFIKICAvUmVzb3VyY2VzIDw8CiAgICAvRm9u
dCA8PAogICAgICAvRjEgNCAwIFIKICAgICAgL0YyIDYgMCBSCiAgICAgIC9GMyA3IDAgUgogICAg
Pj4KICAgIC9YT2JqZWN0IDw8CiAgICAgIC9pbWczIDggMCBSCiAgICAgIC9pbWc0IDkgMCBSCiAg
 

cocale2001

Member
Licensed User
The problem isalso another.Some server rejecting the message.
Others accept the message but when I submit the attached message is unreadable.
Otherwise:
WhenI read the message save the attachmentto disk, and then I shall return then the attachment is fixed
I'm confused ...
 

giga

Well-Known Member
Licensed User
The problem isalso another.Some server rejecting the message.
Others accept the message but when I submit the attached message is unreadable.
Otherwise:
WhenI read the message save the attachmentto disk, and then I shall return then the attachment is fixed
I'm confused ...
"The problem isalso another.Some server rejecting the message"
Are you receiving an actual rejection error message from the recipients server? if so what exactly does it say? Can you upload or paste the exact error?
 

cocale2001

Member
Licensed User
"The problem isalso another.Some server rejecting the message"
Are you receiving an actual rejection error message from the recipients server? if so what exactly does it say? Can you upload or paste the exact error?
I can't see the smtp server log.Simply enter the email andt his is not received.
This was the case with a popular Italian postal servers smtp.tiscali.it
If there are not attachments that every thing works correctly
I do not know what to do since the form b4a smtp does not provide any thing particular.
 

giga

Well-Known Member
Licensed User
"I can't see the smtp server log. Simply enter the email andt his is not received"
(To My Knowledge) Most mail servers will send a rejection message back if a message is undeliverable.

Here is what I would try.
1. Use an email account that you have access to from a PC.
2. Send the email message again using this account on the device.
3. Then on the PC check the email for that account and see if you receive a "NDR"(Non-delivery return) for the message in question
**NDR's can take up to 48hrs to return to you(based off the servers configuration)**

That may give you more insight to what's happening.

Unfortunately some mail servers may reject your message(s) based of their spam rules/settings. But again you should get a notice from the recipients server.

Just like Snail Mail.

**Now the downside, Some spam filtering programs can strip the attachment from the messages and let the message go through.
example GFI Mail Essentials :( YOU have no control of this.
 
Top