Hola estoy tratando de mandar correos desde sql server pero me manda ese error.
El servidor SMTP requiere una conexión segura o el cliente no se autenticó
Ya desactive la seguridad de gmail El password esta bien
El Imap tambien lo habilite
EXECUTE msdb.dbo.sysmail_add_profile_sp
@profile_name = 'FacturacionSAT',
@description = 'Perfil para mandar facturas a clientes.' ;
GO
EXECUTE msdb.dbo.sysmail_add_principalprofile_sp
@profile_name = 'FacturacionSAT',
@principal_name = 'public',
@is_default = 1 ;
GO
EXECUTE msdb.dbo.sysmail_add_account_sp
@account_name = 'Gmail',
@description = 'Mandar facturas a clientes.',
@email_address = '[email protected]',
@display_name = 'Automated Mailer',
@mailserver_name = 'smtp.gmail.com',
@port = 587,
@enable_ssl = 1,
@username = '[email protected]',
@password = 'adsdasd' ;
GO
EXECUTE msdb.dbo.sysmail_add_profileaccount_sp
@profile_name = 'FacturacionSAT',
@account_name = 'Gmail',
@sequence_number =1 ;
GO
exec msdb.dbo.sysmail_configure_sp 'MaxFileSize','2000000'
exec msdb.dbo.sysmail_configure_sp 'AccountRetryAttempts','3'
exec msdb.dbo.sysmail_configure_sp 'DefaultAttachmentEncoding','MIME'
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'FacturacionSAT',
@recipients = '[email protected]',
@body = 'The database mail configuration was completed successfully.',
@subject = 'Automated Success Message';
GO