diff --git a/build.sh b/build.sh index befc53e..724a4b5 100755 --- a/build.sh +++ b/build.sh @@ -135,6 +135,32 @@ go build \ -o ~/bin/nextcloud-mail echo "✓ nextcloud-mail built successfully" +# Verification: Show what credentials were embedded +echo "" +echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" +echo " Build Verification Summary" +echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" +echo " IMAP Server: $IMAP_SERVER" +echo " IMAP Port: $IMAP_PORT" +echo " IMAP Username: $IMAP_USER" +echo " IMAP Password: [$(echo "$IMAP_PASS" | sed 's/./*/g')]" +echo " SMTP Server: $SMTP_SERVER" +echo " SMTP Port: $SMTP_PORT" +echo " SMTP Username: $SMTP_USER" +echo " SMTP Password: [$(echo "$SMTP_PASS" | sed 's/./*/g')]" +echo " Use SSL: $USE_SSL" +echo " Ignore Certs: $IGNORE_CERTS" +echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" +echo "" + +if [ -z "$IMAP_USER" ] || [ -z "$IMAP_PASS" ]; then + echo "⚠️ Warning: IMAP username or password appears to be empty!" + echo " The binary was built but may not work correctly." + echo " If this is incorrect, please rebuild with valid credentials." +fi + +echo "" + echo "" echo "All tools built successfully!" echo "" diff --git a/quick-test.sh b/quick-test.sh index e532ca4..db8cdcd 100755 --- a/quick-test.sh +++ b/quick-test.sh @@ -1,6 +1,6 @@ #!/bin/bash # Quick Test Script for nextcloud-mail -# Usage: ./quick-test.sh +# Usage: ./quick-test.sh set -e @@ -11,6 +11,20 @@ echo "=========================================" echo "nextcloud-mail Quick Test Suite" echo "=========================================" echo "" + +# Check if binary has credentials before running +echo "Checking binary credentials..." +if ~/bin/nextcloud-mail --help 2>&1 | grep -q '"imap-server".*"\"\"'; then + echo "❌ Error: nextcloud-mail binary was built with empty credentials!" + echo " Please run ./build.sh again and provide valid IMAP/SMTP credentials." + echo "" + echo "Current binary shows:" + ~/bin/nextcloud-mail --help 2>&1 | grep -A2 '"imap-server"' + echo "" + exit 1 +fi + +echo "✓ Binary has credentials configured" echo "Username: $USERNAME" echo "Test Directory: $TEST_DIR" echo ""