Database Mail works in Production but not in Test Database
To send Database mail, users must be a user in the msdb database and a member of the DatabaseMailUserRole database role in the msdb database. 

To add msdb users or groups to this role use SQL Server Management Studio or execute the following statement for the user or role that needs to send Database Mail.

EXEC msdb.dbo.sp_addrolemember @rolename = 'DatabaseMailUserRole'
    ,@membername = '&lt;user or role name&gt;';
GO


Source: Microsoft docs  Permission denied on sp_send_dbmail