Skip to content

Commit

Permalink
Merge pull request #38 from Capstone-Richam/feature/mail
Browse files Browse the repository at this point in the history
feat:commit
  • Loading branch information
beakgugong authored Dec 8, 2023
2 parents d0fcf46 + dadd7c4 commit 76e7a94
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/main/java/com/Nunbody/domain/Mail/domain/MailBody.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.hibernate.annotations.Fetch;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.data.mongodb.core.mapping.FieldType;


@Data
Expand All @@ -18,7 +19,7 @@ public class MailBody {
private String id;
@Field(name = "mailId")
private Long mailId;
@Field(name = "content")
@Field(name = "content", targetType = FieldType.STRING)
private String content;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public ResponseEntity<SuccessResponse<?>> validate(@RequestBody ValidateRequestD
final String string= mailManageService.validateConnect(validateRequestDto);
return SuccessResponse.ok(string);
}
@GetMapping("{id}")
@GetMapping("/header/{id}")
public ResponseEntity<SuccessResponse<?>> getMailBody(@PathVariable("id") Long mailId){
final MailBodyResponseDto mailBody = mailService.getMailBody(mailId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public MailList mailSetting(Long userId,String platformHost, String platformId,
MailHeader mailHeaderData;


for (int i = 0; i <10 ; i++) {
for (int i = 80; i <90 ; i++) {
matcher = pattern.matcher(messages[i].getFrom()[0].toString());
if (matcher.find()) {
String fromPerson = matcher.group(1);
Expand Down Expand Up @@ -163,7 +163,7 @@ public MailBody extractMailBody(Message messages, Long mailId) throws MessagingE

MailBody mailBody = MailBody.builder()
.mailId(mailId)
.content(contentBytes != null ? new String(contentBytes, StandardCharsets.UTF_8) : null)
.content(contentBytes != null ? new String(contentBytes, StandardCharsets.UTF_8) : " ")
.build();

return mailBody;
Expand Down

0 comments on commit 76e7a94

Please sign in to comment.