angelos3lex / react-native-smtp-mailer

Send emails by connecting to smtp server+attachments, using android javamail and ios mailcore2
39 stars 32 forks source link

Error while sending a mail #37

Open octaviotastico opened 3 years ago

octaviotastico commented 3 years ago

When I run this code:

await RNSmtpMailer.sendMail({
    mailhost: "smtp.gmail.com",
    port: "465",
    ssl: true,
    from: "get.food.cordoba@gmail.com",
    username: "get.food.cordoba@gmail.com",
    password: "password123",
    recipients: "octaviopercivaldi2@gmail.com",
    subject: "subject 123",
    htmlBody: "<p>body 123</p>",
    attachmentPaths: [],
    attachmentNames: [],
    attachmentTypes: [],
  })

I get this error:

[Unhandled promise rejection: TypeError: null is not an object (evaluating '_reactNativeSmtpMailer.default.sendMail')]

I don't know what to do to fix this issue, I didn't find any solution yet

angelos3lex commented 3 years ago

Seems like an installation issue for me. Platform? version?

Cob007 commented 3 years ago

Having same issue platform ios version : 1.2.3 and I used auto-linking

@angelos3lex

Cob007 commented 3 years ago

@angelos3lex although I have passed this error, but after specifying the correct credential to my smtp mailhost this is the error I am getting everything,

[Error: A stable connection to the server could not be established.]

thanks....

xBajci commented 2 years ago

I saw the same error when I used expo. After I ejected, it worked.