Activities of "Zahra"

Answer

I can not send my project because it is private

I think you can solve it without my project

Answer

background job dose not work ...I don't know why

I send for you the code and this is the error

Answer

maybe their is configuration I forget to write

Answer

if I invent some peoples for a meetings ..it will send an email for all of them

Answer

on Application.Contracts Layers

[BackgroundJobName("EmailSendingArgs2")]
public class EmailSendingArgs
{
    public List<string>? EmailAddressList { get; set; }
    public string? Subject { get; set; }
    public string? Body { get; set; }
    
}

on Application Layers

public class EmailSendingJob : AsyncBackgroundJob<EmailSendingArgs>, ITransientDependency
	{
		private readonly IEmailSender _emailSender;

		public EmailSendingJob(IEmailSender emailSender)
		{
			_emailSender = emailSender;
		}

		public override async Task  ExecuteAsync(EmailSendingArgs args)
		{
			foreach (string emailAddress in args.EmailAddressList)
			{
				await _emailSender.SendAsync(
					emailAddress,
					args.Subject,
					args.Body
				);
			}

		}
	}

on AppService

 await _backgroundJobManager.EnqueueAsync(
                                new EmailSendingArgs
                                {
                                    EmailAddressList = emailAddressList,
                                    Subject = subject,
                                    Body = emailBody
                                }
                            );
                            ```

but your demo dose not contain any images

Showing 1 to 6 of 6 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11