forked from Eagle-OJ/eagle-oj-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e8c780
commit 6df64d6
Showing
18 changed files
with
539 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>eagle-oj</artifactId> | ||
<groupId>com.eagleoj</groupId> | ||
<version>1.0</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>eagle-oj-mail</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.sun.mail</groupId> | ||
<artifactId>javax.mail</artifactId> | ||
<version>1.6.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-mail</artifactId> | ||
</dependency> | ||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.eagleoj.mail; | ||
|
||
import org.springframework.mail.javamail.JavaMailSenderImpl; | ||
import org.springframework.mail.javamail.MimeMessageHelper; | ||
|
||
import javax.mail.internet.MimeMessage; | ||
|
||
/** | ||
* @author Smith | ||
**/ | ||
public class Main { | ||
public static void main(String[] args) throws Exception { | ||
JavaMailSenderImpl sender = new JavaMailSenderImpl(); | ||
sender.setHost("smtpdm.aliyun.com"); | ||
sender.setPort(80); | ||
sender.setUsername("mail@eagleoj.com"); | ||
sender.setPassword("v2l8CRlTPtLvz6ocp2Bv"); | ||
sender.testConnection(); | ||
MimeMessage message = sender.createMimeMessage(); | ||
MimeMessageHelper helper = new MimeMessageHelper(message); | ||
helper.setTo("chendingchao1@126.com"); | ||
helper.setText("Thank you for ordering!"); | ||
helper.setSubject("xx"); | ||
helper.setFrom("mail@eagleoj.com"); | ||
sender.send(message); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...-web/src/main/java/com/eagleoj/web/controller/format/admin/UpdateGlobalSettingFormat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.eagleoj.web.controller.format.admin; | ||
|
||
import org.hibernate.validator.constraints.Length; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
/** | ||
* @author Smith | ||
**/ | ||
public class UpdateGlobalSettingFormat { | ||
|
||
@NotNull | ||
@Length(min = 1, max = 20) | ||
private String title; | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public void setTitle(String title) { | ||
this.title = title; | ||
} | ||
} |
Oops, something went wrong.