987c036ef5203b85ddd9e471730bcd131052dbe9
[gigi.git] / src / org / cacert / gigi / email / MailProbe.java
1 package org.cacert.gigi.email;
2
3 import java.io.IOException;
4
5 import org.cacert.gigi.localisation.Language;
6 import org.cacert.gigi.util.ServerConstants;
7
8 public class MailProbe {
9
10     public static void sendMailProbe(Language l, String type, int id, String hash, String address) throws IOException {
11         StringBuffer body = new StringBuffer();
12         body.append(l.getTranslation("Thanks for signing up with SomeCA.org, below is the link you need to open to verify your account. Once your account is verified you will be able to start issuing certificates till your hearts' content!"));
13         body.append("\n\nhttps://");
14         body.append(ServerConstants.getWwwHostNamePortSecure());
15         body.append("/verify?type=");
16         body.append(type);
17         body.append("&id=");
18         body.append(id);
19         body.append("&hash=");
20         body.append(hash);
21         body.append("\n\n");
22         body.append(l.getTranslation("Best regards"));
23         body.append("\n");
24         body.append(l.getTranslation("SomeCA.org Support!"));
25         EmailProvider.getInstance().sendMail(address, "[SomeCA.org] " + l.getTranslation("Mail Probe"), body.toString(), "support@cacert.org", null, null, null, null, false);
26     }
27
28 }