In SQL Server, Database Mail uses profiles to send the email rather than accounts directly.
Therefore you must first create a profile, and create an account, then add the account to the profile. You also need to grant a user in the msdb database access to the profile.
To add a Database Mail account to a profile with T-SQL, use the sysmail_add_profileaccount_sp
stored procedure in the msdb database.