zenodo_accessrequests/receivers.py
def send_email_validation(request):
    """Receiver for request-created signal to send email notification."""
    token = EmailConfirmationSerializer().create_token(
        request.id, dict(email=request.sender_email)
    )
    pid, record = get_record(request.recid)

    _send_notification(
        request.sender_email,
        _("Access request verification"),
        "zenodo_accessrequests/emails/validate_email.tpl",
        request=request,
        record=record,
        pid=pid,
        days=timedelta(
            seconds=current_app.config["ACCESSREQUESTS_CONFIRMLINK_EXPIRES_IN"]
        ).days,
        confirm_link=url_for(
            "invenio_records_ui.recid_access_request_email_confirm",
            pid_value=request.recid,
            token=token,
            _external=True,
        )
    )
def send_email_validation(request):
    """Receiver for request-created signal to send email notification."""
    token = EmailConfirmationSerializer().create_token(
        request.id, dict(email=request.sender_email)
    )
    pid, record = get_record(request.recid)

    _send_notification(
        request.sender_email,
        _("Access request verification"),
        "zenodo_accessrequests/emails/validate_email.tpl",
        request=request,
        record=record,
        pid=pid,
        days=timedelta(
            seconds=current_app.config["ACCESSREQUESTS_CONFIRMLINK_EXPIRES_IN"]
        ).days,
        confirm_link=url_for(
            "invenio_records_ui.recid_access_request_email_confirm",
            pid_value=request.recid,
            token=token,
            _external=True,
        )
    )
def send_email_validation ( request ) : token = EmailConfirmationSerializer ( ) . create_token ( request . id , dict ( email = request . sender_email ) ) pid , record = get_record ( request . recid ) _send_notification ( request . sender_email , _ ( "Access request verification" ) , "zenodo_accessrequests/emails/validate_email.tpl" , request = request , record = record , pid = pid , days = timedelta ( seconds = current_app . config [ "ACCESSREQUESTS_CONFIRMLINK_EXPIRES_IN" ] ) . days , confirm_link = url_for ( "invenio_records_ui.recid_access_request_email_confirm" , pid_value = request . recid , token = token , _external = True , ) )
Receiver for request-created signal to send email notification.
Receiver for request - created signal to send email notification .