email.send() to Email that not exist

lock
push_pin
done
Beantwoord
0

Hi,

I have a question.

I send an email 

Void sendNotification(Integer customerId, String emailFor, Integer replyTemplateId)
{
  // Load customer
  Customer customer;
  customer.load(customerId);
  Integer customerLanguage = customer.getValue("language").toInteger();

  // Load reply template
  ReplyTemplate rt;
  rt.load(replyTemplateId);
  String subject = rt.getSubject(customerLanguage);
  String bodyPlain = rt.getPlainBody(customerLanguage);
  String bodyHtml = rt.getHtmlBody(customerLanguage);

  // Parse templates with customer and ticket
  Parser parser = getParser();
  customer.toParser(parser);
  subject = parser.parseString(subject);
  bodyPlain = parser.parseString(bodyPlain);
  bodyHtml = parser.parseString(bodyHtml);

  // Send email
  Email email;
  email.setValue("from","ticketsystem@akgsoftware.de");
  email.setValue("to", emailFor);
  email.setValue("subject", subject);
  if (bodyPlain != "")
  {
    email.setValue("body", bodyPlain);
  }
  if (bodyHtml != "")
  {
    email.setValue("bodyHtml", bodyHtml);
  }
  email.s
  email.send();
}

In the fall where the emailadresse not exist, i'm in the customerservice, the content from the email will be show in my html page.

Are this normal ?

Have you got any idea?

Thanks Fabrice

1 aug 2025 | 10:29 a.m.

Alles Antwoorden (0)

Reply toevoegen