You need to sign in to do that
Don't have an account?
timomer
Tests for InboundEmail class
Hello,
I have built a InboundEmail class that takes an email and inserts a record into a custom object.
I need to build a test method for this but have no idea how, can I send it a fake email?
any suggestions appreciated!
many thanks,
Tim
All Answers
thank you for that, I was able to modify it to do my tests.
fyi for anyone else...
email.PlainTextBody = if you need to set body in the text
also, if you need to test from address you need to set it in two places...
email.fromAddress =
env.fromAddress =
thanks!