fixing problem with mailgun api script