0

如何通过 sendinblue 在 java 中发送电子邮件。直接在java代码中

 try {
            //AllRouteExamples obj = new AllRouteExamples();
            TransactionalEmailsApi api = new TransactionalEmailsApi();
            Long templateId = 1L;
            List<String> emailTo = new ArrayList<String>();
            emailTo.add("sample@gmail.com");
            SendTestEmail sendTestEmail = new SendTestEmail();
            sendTestEmail.setEmailTo(emailTo);
            api.sendTestTemplate(templateId, sendTestEmail);
        } catch (Exception e) {
            System.out.println("Exception occurred:- " + e.getMessage());
            e.printStackTrace();
        }

上面的代码直接进入事务(仪表板)而不是我们的电子邮件 ID。

4

0 回答 0