corrected mailgun domain
Trim Whitespaces and HTML special characters, REmoved function, Adjusted if/else statement, applied mailgun API