Creating Database Mail with T-SQL returns "principal name is not valid"
Is the name you're using a user in the msdb database? 


  [ @principal_name = ] 'principal_name'
  The name of the database user or role in the msdb database for the association. principal_name is sysname, with a default of NULL. Either principal_id or principal_name must be specified. A principal_name of 'public' makes this profile a public profile, granting access to all principals in the database.