Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I need help, How to pass credentials to AmazonSimpleEmailServiceClient #16

Open
roubledodemiamgasoni opened this issue Apr 15, 2024 · 1 comment

Comments

@roubledodemiamgasoni
Copy link

What I have to do, I need an example passing the credentials via code.

var
  Client: IAmazonSimpleEmailService;
  Request: ISendEmailRequest;
  Response: ISendEmailResponse;
begin
  // 2. Instantiate client interface

  Client := TAmazonSimpleEmailServiceClient.Create;

  //Client := TAmazonSQSClient.Create('myAccessKey', 'mySecretKey');
  // 3. Create and fill the request
  Request := TSendEmailRequest.Create;

  Request.Source := vg_EmailConfig.Remetente;
  Request.Destination := TDestination.Create;
  Request.Destination.ToAddresses.Add(Destinatarios);
  Request.Message := TMessage.Create(
    TContent.Create(Assunto),
    TBody.Create(TContent.Create(Mensagem)));

  // 4. Call operation method passing the request to receive the response;
  Response := Client.SendEmail(Request);
@wlandgraf
Copy link
Contributor

You just pasted the example. Just replace myAcessKey and mySecretKey with your own AWS Access ID and Secret, respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants