Added mailname and removed SMTP codes