-
Notifications
You must be signed in to change notification settings - Fork 3
Feeding test emails for testing
David Cabo edited this page Feb 12, 2015
·
3 revisions
Two relevant scripts:
-
handle-mail-replies
comes first and discards out of office and permanently failed addresses. Use:$ script/handle-mail-replies < /Users/David/Desktop/mail.txt
-
mailin
does the actual processing of valid responses. Do:$ script/mailin < /Users/David/Desktop/mail.txt
This will most probably fail because the processing includes sending an email message saying "Response received", which may very well not work in dev because there's no SMPT server, for example. At least that's what happened to me, but it didn't matter, because the message still gets processed.
However the mutt-related error may make it impossible to see any other error in the code, in which case you may want to edit
mailin
to do:# /usr/bin/mutt -s "$SUBJ" -a "$OUTPUT" "$INPUT" -- "$OPTION_CONTACT_EMAIL" <<<"$BODY" cat $OUTPUT
Alternatively there's another option, potentially the best one: just make the email sending work, run Mailcatcher as a mock SMTP server.