auth mail adapted to the server

This commit is contained in:
Chneemann 2024-08-15 17:07:27 +02:00
parent 54f411ae87
commit 9b5bbd3988
7 changed files with 9 additions and 9 deletions

View file

@ -65,7 +65,7 @@ class RegisterView(APIView):
subject='Confirm your email', subject='Confirm your email',
body=strip_tags(html_body), # Plain text fallback body=strip_tags(html_body), # Plain text fallback
from_email='noreply@videoflix.com', from_email='noreply@videoflix.com',
to=['andre.kempf.dev@gmail.com'] to=user.email
) )
message.attach_alternative(html_body, "text/html") message.attach_alternative(html_body, "text/html")
message.send(fail_silently=False) message.send(fail_silently=False)
@ -116,7 +116,7 @@ class ForgotPasswordView(APIView):
subject='Reset your Password', subject='Reset your Password',
body=strip_tags(html_body), # Plain text fallback body=strip_tags(html_body), # Plain text fallback
from_email='noreply@videoflix.com', from_email='noreply@videoflix.com',
to=['andre.kempf.dev@gmail.com'] to=user.email
) )
message.attach_alternative(html_body, "text/html") message.attach_alternative(html_body, "text/html")
message.send(fail_silently=False) message.send(fail_silently=False)

View file

@ -1,5 +1,5 @@
from .models import Video from .models import Video
from .tasks import convert_video_to_hls, create_thumbnails, delete_original_video, update_thumbnail_status from .tasks import convert_video_to_hls, create_thumbnails, delete_original_video
from django.dispatch import receiver from django.dispatch import receiver
from django.db.models.signals import post_save, post_delete from django.db.models.signals import post_save, post_delete
from django.conf import settings from django.conf import settings

View file

@ -39,7 +39,7 @@
<p> <p>
We recently received a request to reset your password. If you made this request, please click on the following link to reset your password: We recently received a request to reset your password. If you made this request, please click on the following link to reset your password:
</p> </p>
<a class="btn" href="http://localhost:4200/forgot-password?email={{ email }}&token={{ token }}">Reset Password</a> <a class="btn" href="https://videoflix.andre-kempf.com/forgot-password?email={{ email }}&token={{ token }}">Reset Password</a>
<p>Please note that for security reasons, this link is only valid for 24 hours.</p> <p>Please note that for security reasons, this link is only valid for 24 hours.</p>
<p>If you did not request a password reset, please ignore this email.</p> <p>If you did not request a password reset, please ignore this email.</p>
<p>Best regards,</p> <p>Best regards,</p>

View file

@ -40,7 +40,7 @@
Thank you for registering with Videoflix. To complete your registration Thank you for registering with Videoflix. To complete your registration
and verify your email address, please click the link below: and verify your email address, please click the link below:
</p> </p>
<a class="btn" href="http://localhost:4200/verify-email?email={{ email }}&token={{ token }}">Activate account</a> <a class="btn" href="https://videoflix.andre-kempf.com/verify-email?email={{ email }}&token={{ token }}">Activate account</a>
<p> <p>
If you did not create an account with us, please disregard this email. If you did not create an account with us, please disregard this email.
</p> </p>

View file

@ -14,7 +14,7 @@ export class CategoriesComponent {
@Input() currentMovie: number = 0; @Input() currentMovie: number = 0;
@Output() currentMovieId = new EventEmitter<number>(); @Output() currentMovieId = new EventEmitter<number>();
environmentBaseUrl: string = environment.baseUrl.slice(0, -1); environmentBaseUrl: string = environment.baseUrl;
filmGenres = [ filmGenres = [
'action', 'action',

View file

@ -21,7 +21,7 @@ export class HeroBannerComponent {
@Input() currentMovie: any[] = []; @Input() currentMovie: any[] = [];
@Output() playMovie = new EventEmitter<string>(); @Output() playMovie = new EventEmitter<string>();
environmentBaseUrl: string = environment.baseUrl.slice(0, -1); environmentBaseUrl: string = environment.baseUrl;
constructor(private el: ElementRef, private movieService: MovieService) {} constructor(private el: ElementRef, private movieService: MovieService) {}

View file

@ -1,7 +1,7 @@
export const environment = { export const environment = {
// Development // Development
baseUrl: 'http://127.0.0.1:8000/', //baseUrl: 'http://127.0.0.1:8000',
// Live // Live
// baseUrl: 'https://videoflix-django.andre-kempf.com', baseUrl: 'https://videoflix-django.andre-kempf.com',
}; };