angelos3lex / react-native-smtp-mailer

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

RNSmtpMailer undefined #6

Closed shuffledex closed 5 years ago

shuffledex commented 5 years ago

I was doing step by step the iOS manual installation. All was fine (without errors) but when I test the code, RNSmtpMailer is undefined.

Here what I have:

import RNSmtpMailer from "react-native-smtp-mailer"; RNSmtpMailer.sendMail({ mailhost: Config.MAIL_HOST, port: Config.MAIL_PORT, ssl: true, username: Config.MAIL_USER, password: Config.MAIL_PASS, from: Config.FROM, recipients: this.props.email, subject: "xxx", htmlBody: "xxx" attachmentPaths: [], attachmentNames: [], attachmentTypes: [] }) .then(success => console.log(success)) .catch(err => console.log(err));

angelos3lex commented 5 years ago

Did you follow all 4 Manual steps correctly and then also cocoapods installation steps below(pod install ...)? If yes, then which RN version and which react-native-smtp-mailer version are you using?