Remove deprecated use of empty()
Send mail using service