Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16123] iOS: Email dialog doesn't send messages when attachment is a PDF with many pages

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.2.0
Fix Version/sn/a
ComponentsiOS
LabelsSupportTeam
ReporterMauro Parra-Miranda
AssigneeUnknown
Created2014-01-03T06:15:41.000+0000
Updated2018-02-28T20:03:17.000+0000

Description

Problem Description

When you add an attachment to the email Dialog, it won't send the mail

Test Case

  var emailDialog = Titanium.UI.createEmailDialog();
    emailDialog.setSubject('Hello from Titanium!');
    emailDialog.setToRecipients(['mauropm@gmail.com']);
    emailDialog.setCcRecipients(['mauropm+test@gmail.com']);
    emailDialog.setBccRecipients(['mauropm+bcc@gmail.com']);

    if (Ti.Platform.name == 'iPhone OS') {
        emailDialog.setMessageBody('<b>Appcelerator Titanium Rocks!</b>å');
        emailDialog.setHtml(true);
        emailDialog.setBarColor('#336699');
    } else {
        emailDialog.setMessageBody('Appcelerator Titanium Rocks!');
    }

  
    // attach a file
    var f = Ti.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, 'test.pdf');
    emailDialog.addAttachment(f);

    emailDialog.addEventListener('complete',function(e)
    {
        if (e.result == emailDialog.SENT)
        {
            if (Ti.Platform.osname != 'android') {
                // android doesn't give us useful result codes.
                // it anyway shows a toast.
                alert("message was sent");
            }
        }
        else
        {
            alert("message was not sent. result = " + e.result);
        }
    });
    emailDialog.open();

Steps to reproduce

1. Create a new Mobile Project Classic Titanium 2. Paste the test case to the app.js 3. Run it 4. Results: the code will alert that the mail was sent, but it never goes out of the device.

Attachments

FileDateSize
test.pdf2014-01-03T06:18:01.000+0000123683

Comments

No comments

JSON Source