This is HTML email
") 93 | } catch (e: Exception) { 94 | return ResponseEntity(ResponseMessage("Error while sending message"), HttpStatus.BAD_REQUEST) 95 | } 96 | 97 | return ResponseEntity(ResponseMessage("Email has been sent"), HttpStatus.OK) 98 | } 99 | } -------------------------------------------------------------------------------- /backend/src/main/kotlin/com/kotlinspringvue/backend/email/EmailService.kt: -------------------------------------------------------------------------------- 1 | package com.kotlinspringvue.backend.email 2 | 3 | import com.kotlinspringvue.backend.jpa.User 4 | 5 | interface EmailService { 6 | fun sendSimpleMessage(to: String, 7 | subject: String, 8 | text: String) 9 | 10 | fun sendSimpleMessageUsingTemplate(to: String, 11 | subject: String, 12 | template: String, 13 | params:MutableMapPlease, follow the link to complete your registration:
" 119 | user.email?.let{sendHtmlMessage(user.email!!, "KSVG APP: Registration Confirmation", msg)} 120 | } 121 | } -------------------------------------------------------------------------------- /backend/src/main/kotlin/com/kotlinspringvue/backend/jpa/Person.kt: -------------------------------------------------------------------------------- 1 | package com.kotlinspringvue.backend.jpa 2 | 3 | import javax.persistence.Column 4 | import javax.persistence.Entity 5 | import javax.persistence.GeneratedValue 6 | import javax.persistence.GenerationType 7 | import javax.persistence.Id 8 | import javax.persistence.Table 9 | 10 | @Entity 11 | @Table (name="person") 12 | data class Person( 13 | 14 | @Id 15 | @GeneratedValue(strategy = GenerationType.AUTO) 16 | val id: Long, 17 | 18 | @Column(nullable = false) 19 | val name: String 20 | ) 21 | -------------------------------------------------------------------------------- /backend/src/main/kotlin/com/kotlinspringvue/backend/jpa/Role.kt: -------------------------------------------------------------------------------- 1 | package com.kotlinspringvue.backend.jpa 2 | 3 | import javax.persistence.* 4 | 5 | @Entity 6 | @Table(name = "roles") 7 | data class Role ( 8 | 9 | @Id 10 | @GeneratedValue(strategy = GenerationType.AUTO) 11 | val id: Long, 12 | 13 | @Column(name="name") 14 | val name: String 15 | 16 | ) -------------------------------------------------------------------------------- /backend/src/main/kotlin/com/kotlinspringvue/backend/jpa/User.kt: -------------------------------------------------------------------------------- 1 | package com.kotlinspringvue.backend.jpa 2 | 3 | import javax.persistence.* 4 | 5 | @Entity 6 | @Table(name = "users") 7 | data class User ( 8 | 9 | @Id 10 | @GeneratedValue(strategy = GenerationType.AUTO) 11 | val id: Long? = 0, 12 | 13 | @Column(name="username") 14 | var username: String?=null, 15 | 16 | @Column(name="first_name") 17 | var firstName: String?=null, 18 | 19 | @Column(name="last_name") 20 | var lastName: String?=null, 21 | 22 | @Column(name="email") 23 | var email: String?=null, 24 | 25 | @Column(name="password") 26 | var password: String?=null, 27 | 28 | @Column(name="enabled") 29 | var enabled: Boolean = false, 30 | 31 | @ManyToMany(fetch = FetchType.EAGER) 32 | @JoinTable( 33 | name = "users_roles", 34 | joinColumns = [JoinColumn(name = "user_id", referencedColumnName = "id")], 35 | inverseJoinColumns = [JoinColumn(name = "role_id", referencedColumnName = "id")] 36 | ) 37 | var roles: CollectionHello, dear:
11 |Counter: {{ counter }}
5 |Username: {{ username }}
6 |
5 | For a guide and recipes on how to configure / customize this project,
6 | check out the
7 | vue-cli documentation.
8 |
13 | Login and start 14 |
15 | 16 |Account is successfully verified!
12 |Verification failed:
18 |{{ errorMessage }}
19 |You have been successfully registered!
23 |A confirmation email has been sent. Please, click the link in this email to verify your email.
24 |