Closed shuffledex closed 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));
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));
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?
pod install ...
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));