File size: 1,216 Bytes
6ec767d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
def get_email_html(user_name, bourses, formations):
    items_html = ""
    for _, b in bourses.iterrows():
        items_html += f"""
        <div style="padding: 15px; border-left: 4px solid #2563eb; background: #f8fafc; margin-bottom: 10px;">
            <h4 style="margin: 0; color: #1e3a8a;">{b['institution']}</h4>
            <p style="font-size: 14px; margin: 5px 0;">🎯 Match : <strong>{int(b['score_ia']*100)}%</strong></p>
        </div>"""
    
    return f"""
    <div style="font-family: sans-serif; max-width: 600px; margin: auto; border: 1px solid #e2e8f0; padding: 20px; border-radius: 12px;">
        <h2 style="color: #2563eb;">Bonjour {user_name} ! 🚀</h2>
        <p>Notre IA a analysé votre profil. Voici les meilleures opportunités pour votre carrière :</p>
        <h3>🏆 Bourses recommandées</h3>
        {items_html}
        <h3>📚 Formations suggérées</h3>
        <p>Pour renforcer votre dossier, nous vous conseillons : <strong>{formations.iloc[0]['titre']}</strong></p>
        <hr style="margin-top: 20px; border: 0; border-top: 1px solid #eee;" />
        <p style="font-size: 12px; color: #64748b;">Propulsé par <strong>AfriAI Solutions</strong></p>
    </div>
    """