International Journal of Electrical and Computer Engineering (IJECE) Vol. No. October 2025, pp. ISSN: 2088-8708. DOI: 10. 11591/ijece. Artificial intelligence-driven integrated system for comprehensive email marketing automation Soumaya Loukili. Lotfi Elaachak. Abderrahim Ghadi. Abdelhadi Fennan Data and Intelligent Systems Team FSTT. Abdelmalek Essaadi University. Tetouan. Morocco Article Info ABSTRACT Article history: Right in the context of digital marketing, this paper presents a comprehensive integrated system that combines the latest artificial intelligence advancement Ae large language models and diffusion models Ae to generate marketing email subjects and content that result in higher The system uses finetuned large language models for compelling email subject generation and finetuned stable diffusion model for visually appealing and convincing email content images creation. For the latter, both knowledge graphs and vector embeddings have been incorporated to improve contextual relevance. Experimental results demonstrated significant improvement in all engagement metrics that marketers rely on, including 46% growth in open rates, 56% higher click-through rates, and an 51% boost in conversion rates, all compared to human generated content. The unified approach presented by this paper outperforms standalone models and human-generated content in terms of engagement, as the comparative analysis shows. We also discuss the ethical considerations related to content bias and personalization boundaries, alongside challenges faced in this type of projects, such as computation demands and probable solutions. Finally, this paper proposes future directions to be taken, including expansion to other digital marketing channels, the use of other advanced artificial intelligence techniques, and the development of real-time content adaptation mechanisms based on user Received Jan 28, 2025 Revised Jun 20, 2025 Accepted Jun 30, 2025 Keywords: Artificial intelligence Digital marketing Knowledge graphs Large language models Stable diffusion This is an open access article under the CC BY-SA license. Corresponding Author: Soumaya Loukili Data and Intelligent Systems Team FSTT. Abdelmalek Essaadi University Tetouan. Morocco Email: soumaya. loukili1@etu. INTRODUCTION Over the last few years, digital marketing channels have multiplied and became numerous, all with their own agenda and target customers. through this, email marketing remains one of the most important ones to engage with customers and drive conversions. However, one of the challenges of this particular domain is that crafting subjects and visual content of said emails takes time and resources to be done, with no guarantee of them being compelling enough to drive traffic, which is the objective behind the enterprise. Human-generated content, whether in text or visual form, can at times yield lower engagement because of the potential gaps in cohesion, personalization, and alignment with targeted demographics. Therefore, as more reliable artificial intelligence (AI) tools emerge, there is a growing demand for solutions placing high importance on contextual relevance, integrating text with visuals to create an experience that will better resonate with intended audiences. This research thus seeks to design and assess a unified system that integrates the large language models (LLM. to create email subject lines with the stable diffusion models to Journal homepage: http://ijece. ISSN: 2088-8708 create images. By consolidating these state-of-the-art generative AI technologies, the system is intended to create marketing content that remains contextually relevant across different segments of audiences targeted. To this end, the present research compares the performance of a unified system against traditional marketing methods and stand-alone AI models across key engagement metrics: open rates, click-through rates (CTR), and conversion rates. Beyond that, technical challenges of deploying AI-driven marketing content at scale, as well as ethical challenges facing the use of AI in marketing, are issues this research tries to address. The structure of this paper is as follows: section 2 is a literature review on AI in marketing and content generation, including existing research around LLMs and diffusion models. Section 3 is the proposed system architecture, describing, on a higher level, the main components and their role. Section 4. Methodology, explains the technical implementation of the unified system with regards to the integration of LLMs, stable diffusion, knowledge graphs, and vector embeddings. Section 5 describes the experimental design, including data collection, fine-tuning of the models, and their evaluation. Section 6 presents results and key findings, along with performance comparison, from real-life experiment with content generated by the system. Finally, sections 7 and 8 discuss implications for future directions and a conclusion that reflect on the theoretical contributions and ethical considerations of this system, and also ideas about how it can be further extended to other digital marketing channels. LITERATURE REVIEW AI in digital marketing The integration of AI in digital marketing has undergone through significant changes, fundamentally changing how companies communicate with consumers. Early AI implementations were limited to rule-based systems for customer segmentation and email automation tasks. These systems, though efficient, needed more adaptability and personalization. The emergence of machine learning (ML) in the late 1990s enabled more dynamic and data-driven strategies, including targeted recommendations, exemplified by early collaborative filtering algorithms used in platforms like Amazon . The advent of deep learning in the 2010s marked a significant shift in AIAos capabilities, introducing models such as convolutional neural networks (CNN. and recurrent neural networks (RNN. These technologies powered innovations in image recognition, natural language processing (NLP), and predictive analyticsAito drive applications such as chatbots and ad generation . Especially, chatbots showed the power of how NLP can be in enhancing customer interactions, while predictive analytics optimized campaign strategies with regard to finding high-value customers . In 2017, the introduction of transformer architectures, particularly bidirectional encoder representations from transformers (BERT), revolutionized NLP. BERTAos understanding of textual context improved applications such as sentiment analysis . and search engine optimization . Building on these advancements, large language models (LLM. like OpenAIAos GPT-3. 5 and GoogleAos PaLM 2 expanded the possibilities of AI in marketing by enabling the generation of personalized and contextually relevant text . These models support creating personalized email campaigns and ad copies that increase the rate of customer engagement and click-through. Meanwhile, generative models in AI, such as generative adversarial networks (GAN. and diffusion models, including stable diffusion, have taken visual content generation to the next level. GANs dominated this space initially . , but then came the diffusion models, which created high-resolution images by iteratively refining noisy data . With stable diffusion, for instance, marketers can generate brand-aligned visuals that will be in tune with the objectives of a campaign, leading to more engagement and stronger brand All of this progress enables personalization in marketing with AI-powered text and visual content at an unprecedented level. AI-powered recommendation engines, dynamic pricing models, and predictive analytics make campaign optimization possible and the delivery of personalized customer experiences . But, notwithstanding such progress, challenges remain. Advanced AI models can be prohibitively costly for smaller businesses to implement. besides, ethical considerations abound, including algorithmic bias . and environmental impact . Moreover, how automation can be balanced with authenticity still remains a big issue for marketers. It is important to know that even though the ever-evolving face of AI has changed digital marketing, moving from rule-based systems to complex ML, deep learning, and generative AI architectures, it is also engendering many challenges which must be resolved as these rapid advances persist. Large language models Large language models (LLM. have become a fundamental element in modern NLP, primarily driven by the integration of the transformer architecture first proposed by Vaswani et al. Unlike recurrent and convolutional neural networks, transformers use mechanisms of self-attention to process input Int J Elec & Comp Eng. Vol. No. October 2025: 4875-4888 Int J Elec & Comp Eng ISSN: 2088-8708 sequences simultaneously, which significantly increases the efficiency and scalability of language models. This led to the development of these models-pretrained on large datasets and later fine-tuned for specific applications, which is a huge turnaround in NLP research. The introduction of BERT by Devlin et al. demonstrated the effectiveness of bidirectional context modeling through masked language modeling (MLM). BERT attained state-of-the-art performance on a variety of NLP benchmarks, which further highlighted the benefits of pretraining on large corpora followed by task-specific fine-tuning. Its architecture has since motivated further innovations in the field and set a standard for multitask learning within NLP. Generative models such as GPT-3, a generative pre-trained transformer, introduced by Brown et al. , extended the capabilities of LLMs by focusing on autoregressive text generation. GPT-3Aos massive 175-billion-parameter architecture enabled unprecedented zero-shot and few-shot learning, outperforming smaller models in a variety of generative tasks without requiring extensive task-specific data. The later GPT-3. 5 introduced improved fine-grained contextual understanding and demonstrated enhanced reasoning capabilities, proving the utility of generative LLMs for conversational AI, content generation, and beyond. More recent advancements include pathways language model 2 (PaLM . , which was developed by Google . Using multi-modal, multilingual data, the model is said to outperform the competition in tasks related to translation, scientific reasoning, and even code generation. It is generally more efficient, balancing computing needs with how well it performs. PaLM 2 reflects continued research into LLMs designed for specific fields and generic tasks. That sets the example for training methods using resources efficiently. Despite their success. LLMs face notable challenges. Ethical concerns surrounding these models include the perpetuation of biases embedded in training data, risks of misinformation propagation, and susceptibility to malicious use. For example. Weidinger et al. noted risks such as discrimination, misinformation, and automation harms, calling for effective ways to mitigate these problems. Besides, technical limitations, such as hallucinations, where models confidently generate incorrect outputs, and high computational costs are also serious issues that must be addressed. The environmental impact of training and deploying LLMs, especially those with billions of parameters, raises sustainability concerns, as studied by Bender et al. and also. Strubell et al. LLMs such as BERT. GPT-3. 5, and PaLM 2 represent the fast-paced evolution of AI in language understanding and generation. However, the more these models are put into wide use across industries, the more urgent it will be to address their ethical, technical, and societal implications. This will expand their abilities to their fullest potential. Stable diffusion models Diffusion models have become a key technique in generative modeling, with applications ranging from image synthesis to video generation and beyond. The main concept of diffusion models was first proposed by Sohl-Dickstein et al. , and involves iteratively transforming data into noise through a forward diffusion process and then reversing this process to recover the original data. This reverse process is parameterized by deep neural networks and trained to produce high-quality samples from noise . This technique gained prominence with the development of de-noising diffusion probabilistic models (DDPM. in a paper by Ho et al. that demonstrated state-of-the-art performance in image generation by employing variational inference and an architecture based on U-Net. Stable diffusion, thus, as a significant extension of DDPMs, introduced an efficient approach to latent-space diffusion. The stable diffusion model, developed by Rombach et al. , projects data into a compressed latent space using a pre-trained autoencoder, which drastically reduces computational requirements both for training and inference. This innovation not only makes diffusion models accessible for large-scale tasks but also enables real-time applications. Stable diffusion has found wide-spread adoption because it generates photorealistic and high-resolution images whose properties can be controlled, such as style and content specificity. The incorporation of auxiliary methods such as vector embeddings and knowledge graphs has further increased the potential of stable diffusion. Knowledge graphs model structured relations among entities, which allows more contextual relevance and interpretability with generated content . Knowledge graphs integrated into stable diffusion have allowed researchers to produce from such modelsAo outputs grounded in factual or domain-specific knowledge, hence making the end result more reliable and appropriate for specific use in some domains such as pharmaceutical drug discovery and semantic parsing in NLP . Vector embeddings, on the other hand, are a fundamental representation technique in machine learning, as they encode high-dimensional data into continuous vector spaces, preserving semantic This embedding enables stable diffusion models to condition their outputs on textual prompts, which is shown in systems such as Imagen, which is a Google research text-to-image diffusion model known for its high photorealism . , and DALL-E, a model developed by OpenAI that creates images from text prompts . AI-driven integrated system for comprehensive email marketing automation (Soumaya Loukil. A ISSN: 2088-8708 The integration of vector embeddings and knowledge graphs can overcome two of the most significant weaknesses in diffusion models: lack of control over the content generated and the risk of irrelevant or unstructured outputs. For instance. Feng . showed that embedding techniques, together with knowledge-augmented diffusion models, improved the alignment of generated visuals to their textual descriptions significantly in medical imaging. Likewise, knowledge graphs within diffusion-based frameworks have also shown their potential to align better with domain-specific requirements, as recent works on recommendation systems applied to e-commerce . and product design . have pointed out. While stable diffusion has revolutionized generative AI by combining computational efficiency and creative flexibility, challenges remain. The latent spaces are typically high-dimensional, which presents optimization challenges. the models are sensitive to adversarial prompts, which may produce undesired or misleading outputs . Moreover, similar to large-scale models in general, ethical concerns persist, especially with regard to intellectual property, misinformation, and possible misuse for generating misleading content . These issues, again, require further development of model robustness, transparency, and governance frameworks. Nonetheless, stable diffusion represents an important next step toward both scaling and quality in generative modeling. Its combination with vector embeddings and knowledge graphs epitomizes a growing trend toward improving the capability of models while paying much-needed attention to the practical and ethical aspects of the deployment of generative technologies. Existing gaps Despite the fast development of both LLMs and diffusion models, only some are the frameworks that use both these technologies to solve particular challenges, such as those related to email marketing. Although each of these models has individually achieved great success in its own domainAitext generation and visual content creation, respectivelyAithey are rarely applied together in a single workflow. This disconnection limits the exploration of how their combined potential can enhance creative and impactful marketing strategies . Large language models like GPT-3. PaLM 2, and BERT have considerably enhanced text generation . , producing fluent, coherent, and contextually relevant outputs for various marketing At the same time, some other powerful models, including diffusion-based models like stable diffusion, have achieved similar results in generating appealing, high-quality images that cater to wide-ranging creative needs . However, these are being implemented independently, without a combined system that unifies their functionalities into one solid, high-performing mechanism for marketers. That gap must be filled by allowing marketers to apply fully the various generative AI models in email marketing campaigns before the full potential of AI in email marketing will be leveraged. Another critical gap is how little these generative frameworks incorporate contextual and domain-specific knowledge. Knowledge graphs and vector embeddings, which have proved effective for grounding outputs into domain-specific contexts, are still vastly underutilized in systems using diffusion For example, structured data and relationships from knowledge graphs help improve the relevance of the outputs provided . At the same time, vector embeddings can enrich diffusion models by aligning generated content with themes or branding requirements . Not having this contextual integration constrains the models to be effectively adapted to the domain-specific needs, which makes them less practically applicable within marketing. Another underdeveloped area regarding multi-model systems is the evaluation of generative models. While LLMsAo evaluation metrics are related to fluency, coherence, and relevance, and diffusion modelsAo evaluation are metrics related to visual quality and style control, there needs to be a unified methodology for assessing their combined use cases. A framework that captures the overall effectiveness of outputs for specific applications, such as marketing, remains a significant research challenge . Finally, ethical and operational concerns create a more complex environment for adopting these advanced models. Both large language and diffusion models pick up the biases in their training data and risk creating unintended consequences in the output. This includes, for example, generated texts from LLMs reinforcing stereotypes . and biased or otherwise inappropriate content with diffusion models . Additionally, this high computational cost of training and deploying these models also presents challenges in sustainability, mainly for businesses aiming to deploy scalable solutions . While large language and diffusion models are excellent in their respective domains, there is still a vast, untapped potential between the two as complementary technologies. Lack of integration, contextual grounding, unified evaluation frame-works, and attention to ethical and operational challenges are needed for an approach that considers everything. Enabling systems to integrate these technologies into one framework could revolutionize applications such as email marketing. Int J Elec & Comp Eng. Vol. No. October 2025: 4875-4888 Int J Elec & Comp Eng ISSN: 2088-8708 PROPOSED SYSTEM ARCHITECTURE System overview The proposed system architecture uses fine-tuned large language models, which will be responsible for generating high quality email subjects. It also employs a finetuned stable diffusion model, which will be in charge of generating compelling email visual content. This will ensure that coherent, personalized content is created and is in line with the marketing objectives and product descriptions provided by the user. The architecture follows these key stages: Input data collection and preprocessing The system collects essential input data through a form, including the product title, product description, desired email tone . hosen from multiple option. , and preferred length. For image generation, a prompt is collected, detailing how the user envisions the image and the relevant product description. Text data is preprocessedAitokenized, normalized, and cleanedAiensuring consistency and accuracy before being used for generation. Subject line generation via LLM module The system uses three fine-tuned LLMsAiGPT-3. PaLM 2, and BERTAito generate multiple subject line suggestions based on the provided product description, tone, and length preferences. Because every model offers a unique contribution, the user would have a wide range of options for subject lines. This allows flexibility in choosing that best option that would fit their marketing strategy since each model operates on the same input and molds it into its unique strengths. This multi-model approach tends to yield a more engaging subject line that best fits the targeted audience. Visual content generation via stable diffusion module Once subject lines are generated, one can proceed to create visual content - or vice versa. Here, the stable diffusion module will generate images that complement the chosen subject line in relation to the product description and user-provided prompts. For this purpose, the model also incorporates knowledge graphs and vector embeddings to make the visuals correspond to the thematic elements of the email and its Quality, contextually relevant visuals are created through iterative refinements that enhance the impact of the email campaign. Campaign creation and email deployment After the generation of subject line and visual variations, the system proceeds with the creation of campaigns, where the user decides upon their preferred content. In this case, a final email package is composed, where email segments are selected based on the user's target audience. The system includes integrations of several email service providers (ESP. , such as Sendgrid. Mailgun. Mailchimp. Postmark, and Mailjet, to name a few, where deployment should take place. It is important that the system does not comprise feedback loops in real time. However, through the analytics tools by ESPs, marketers can monitor key metrics that give them precise data about the These include open rates and click-through rates which provides insight into the effectiveness of the campaign. LLM module The LLM module plays a vital part in this system because it generates customized and high-impact email subject lines with three fine-tuned models, namely GPT-3. PaLM 2, and BERT. Each has different positive features, which is a plus point the system takes advantage of. The opportunity the system offers by suggesting a variety of subject lines helps meeting the target audienceAos preferences and market objectives. Integration of multiple LLMs By incorporating GPT-3. PaLM 2, and BERT, the system generates a range of subject line options. GPT-3. 5 excels in creative, human-like outputs. PaLM 2 in conversational tones, and BERT in handling complex semantics. Together, these models ensure that the subject lines are varied and rich in context, increasing engagement potential. Subject line generation process With the input of a product title, description, tone, and subject length, each model generates a dissimilar subject. While the input data is the same, each model interprets it in its own way given their It shows the user three suggestions of a subject line, from which a user can pick the most relevant to his campaign. He could even revise the one in which he sees the most potential, taking elements from all three suggestions. AI-driven integrated system for comprehensive email marketing automation (Soumaya Loukil. A ISSN: 2088-8708 Model fine-tuning for marketing relevance Each of the LLMs has been fine-tuned on email marketing-specific datasets to ensure that the generated subject lines have relevance, drive engagement, and meet best marketing practices. This will ensure the subject lines are aligned with strategies that trigger open rates, such as the use of urgency and Stable diffusion module The stable diffusion module generates highly engaging visual content based on product descriptions and user-provided prompts, functioning independently from subject line generation. At any point during campaign creation, users can initiate the generation of visual content. User-provided product information and the campaignAos overall theme prompt the system to create images that are both aesthetically appealing and aligned with broader marketing objectives. One of the main enhancements in this module is the integration of knowledge graphs and vector embeddings. Knowledge graphs map relationships between entities within the product description, enabling the system to create images that reflect the campaignAos thematic elementsAi whether by emphasizing unique product features or reinforcing brand identity. As for vector embeddings, they translate text-based inputs into rich numerical representations that will enable the model to create visuals capturing the subtlety of the user's prompts, including style and tone, or specific visual requirements. Generation of images involves iteration refinement-a technique where initial noise is refined over successive steps to generate high-quality visuals. Adopting this technique ensures that the generated final images stand contextually in tune with the product description and marketing objectives. The system then generates different alternatives for the user, who can select which image best suits his campaign. It also makes sure that all visuals fit the technical requirements of the email platform in terms of file size, resolution, and aspect ratio, and the asset is ready for deployment across multiple devices and platforms. The stable diffusion module maintains scalability and is built to handle multiple campaigns, along with large datasets, with efficiency. Knowledge graphs, vector embeddings, and the power of diffusion models assure high-quality, contextually relevant visuals. These features will enhance the overall effectiveness of the email campaign by making it more compelling to the consumer. Integration and workflow As shown in Figure 1, the systemAos architecture is built entirely within the Django framework. It is responsible for managing the flow of data between the LLM module and stable diffusion module, ensuring seamless generation and storage of content. Django handles each step of the workflow, from input collection to final campaign deployment, using Python scripts to run the generation processes and retrieve results. Figure 1. AI-driven system architecture Int J Elec & Comp Eng. Vol. No. October 2025: 4875-4888 Int J Elec & Comp Eng ISSN: 2088-8708 User inputs - including product descriptions, visual prompts, and tone preferences - are collected via Django forms and processed by DjangoAos backend. Both the email subject lines and visual content are generated by Python scripts triggered through Django. These scripts interact with the LLM Module for subject line generation and the stable diffusion module for visual content creation. Results produced by these Python processes are subsequently collected and saved in a central database through DjangoAos object-relational mapping (ORM) system. Django's ORM efficiently handles the data flow: every subject line and image generated is correctly linked to its campaign and its product. The system gives users flexibility to create content in any order, with Django maintaining up-to-date storage and synchronization of each generated item. Such a setup will enable users to handle and access the subject lines and visuals seamlessly as they go along creating a campaign. Django also takes care of the longer-running process scheduling and execution, like image generation, via a parallel execution tool called Celery. It is important that content generation is efficient. It is also crucial that, in the background, we maintain overall responsiveness within the system for user experience while handling many generation operations. Once the content is generated and saved in the database. Django packages up the selected subject lines and visuals for sending. The system is integrated with several ESPs, including Sendgrid. Mailgun, and Mailchimp, that support direct sending of campaigns from Django to the target audience. Each one of the integrations with the different ESPs are already pre-set, hence seamless deployment of email campaigns is possible without needing to deal with any application programming interface (API) management from the METHODOLOGY Data collection and preprocessing This study adopts an applied experimental methodology, combining fine-tuning of LLMs and stable diffusion models with comparative evaluation based on real-world campaign data. Fine-tuning the LLMs and the stable diffusion models required highly curated datasets, that went through strict preprocessing workflows, each designed for the particular needs of each architecture. The dataset for the LLM consisted of 644,600 email subject lines sourced from a partner marketing company. this dataset included relevant metadata such as product identifiers, delivery statistics, and open rates, thus covering a broad view of the effectiveness of the campaigns. The linguistic diversity of the subject lines represented several tones and styles that constitute a strong foundation for fine-tuning models like GPT-3. PaLM 2, and BERT for generating high-quality and context-sensitive subject lines. Preprocessing of the LLM dataset began with the most thorough cleaning process. In an effort to prevent redundancy, we made sure to eliminate duplicates and missing values that were not essential for further The next step was text normalization, which ensures that punctuation and capitalization are consistent unless they have se-mantic meaning, like when using words like AuFREEAy to convey urgency. The most important preprocessing steps in LLMs was tokenization, since long text streams had to be reduced to smaller units -words or subwords- to ensure the models could deal with the input. That way, it allowed the models to take in the syntactic structure and semantic nuances necessary in marketing language. Finally, in order to convert words to continuous vector representations, we used pre-trained embeddings -Word2Vec-. This enabled the models to understand the fine-grained relationships between words like AudiscountAy and AupromotionAy. The stable diffusion model was trained on a dataset of 46,326 marketing creatives. These are images of products with metadata: for every product, there is a product description and performance indicators, such as click-through rates. This dataset aligned the visual and the textual data in a way that it allowed the model to generate contextually relevant images given textual prompts. To standardize the input dimensions, all images were resized to a 9:16 aspect ratio. Not only is this size the better fitting for email marketing, but it also retained critical visual details from different sizes. We also normalized pixel values to a mean of 0. 5 and a standard deviation of 0. 5 across all color channels. This step minimized biases caused by variations in lighting, color intensity, and contrast, creating a uniform dataset for training. Data augmentation techniques, such as random cropping, flipping, rotation, and color adjustments, were applied to introduce variability and improve the modelAos ability to generalize. These augmentations enhanced the robustness of the model by simulating diverse real-world scenarios and visual styles commonly found in marketing materials. Preprocessing pipelines for datasets for the LLM and stable diffusion training were carefully designed so that they correspond with the respective data inputs. On one hand. LLMs rely on tokenization and embeddings in order to extract semantic depth in textual data, and on the other, stable diffusion requires normalization and augmentation techniques to maintain visual integrity. This gives all models the ability to better grasp the psychology of the user, and understand which words or writing style is most compelling to These extensive preprocessing steps enhanced the modelsAo performance and also prepared a robust foundation for further training and inference operations. AI-driven integrated system for comprehensive email marketing automation (Soumaya Loukil. A ISSN: 2088-8708 Model fine-tuning In fine-tuning for textual generation, the goal was to adapt large language models such as GPT-3. PaLM 2, and BERT to generate email subject lines for better-performing marketing campaigns. Such fine-tuning involved the identification of the important hyperparameters to be considered for model performance optimization. The first selected hyperparameter is the learning rate, which was set to 0. minimizing abrupt adjustments in the modelsAo learning trajectory and ensuring a smooth gradual Up next, we have the batch size, selected to be 16. This modest size allowed the models to process data in manageable segments, taking into consideration computational restrictions. In the interest of avoiding overfitting, the models were fine-tuned for three epochsAia number determined based on the dataset's complexityAithus allowing the models to learn domain-specific patterns while avoiding memorization of the training data. All three models were optimized using the Adam optimizer, which is extremely efficient in handling sparse gradients and noisy data. This optimizer improves the convergence rates of the models by adaptively changing the learning rates during training. Gradient clipping further stabilized the learning process for GPT-3. 5, specifically to avoid the exploding gradients that may be bothersome in training models on longer sequences, as in the case of email subject generation. For the evaluation of the fine-tuned models, advanced metrics such as bilingual evaluation understudy (BLEU) and recall-oriented understudy for Gisting evaluation (ROUGE) were used. BLEU was selected because of its appropriateness for measuring the precision of generated email subject lines compared with human-written reference lines. BLEU did a very good job in capturing the accuracy of the subject lines in maintaining grammatical structure and coherence. In addition, the ROUGE-LSum metric was used to judge the unigram overlap between generated text and the reference subject lines, with key phrase recall in These metrics allowed for a strong output comparison of the models against human-generated content, therefore quantifying improvements in subject line fluency and relevance. The fine-tuning for personalized marketing images with the stable diffusion model capitalized on knowledge graphs and vector embeddings to enhance the contextual relevance of generated images. It uses product metadata information, including but not limited to product names, product descriptions, and campaign performance metrics like click-through rates, to create these knowledge graphs. Knowledge graphs allowed the model to learn the relationships between marketing elements and hence enabled the generation of images that could meet the requirements of the marketing objectives. Also, vector embeddings allowed representations of textual data in a continuous vector space. These embeddings enabled the semantic richness of product descriptions to be captured by the model for better and coherent visuals. Perceptual loss was used during fine-tuning to enhance the visual fidelity of the generated images. As opposed to traditional pixel-wise loss functions, perceptual loss compares high-level features between the generated and reference images. With the use of this approach, the model produced images that were not only realistic-looking but also semantically very accurate, making them more relevant to the marketing campaign Besides the described methods, advanced neural network architecture was introduced to further improve the model's capability. A graph convolutional network (GCN) was used for knowledge graph processing, able to capture complicated relation-ships among entities in marketing data. This allowed the model to generate contextually enriched visuals that exactly match the associated product information. Integration of the CLIPTextModel -from OpenAIAos contrastive languageAeimage pretraining (CLIP)- was applied -a dual encoder architecture-, that allowed for alignment between textual and visual aspects of marketing creatives. It aligned latent representations of text and images, which helped CLIP enable the model to generate marketing visuals appealing and contextually correct, closely reflecting product descriptions given in the dataset This fine-tuning process for both LLMs and the stable diffusion model demonstrated significant improvement in their generation capabilities. This is especially true for the production of personal and contextually relevant content related to email marketing campaigns. By incorporating advanced evaluation metrics, knowledge graphs, vector embeddings, and perceptual loss, high-quality outputs are generated by the models that aligned with textual and visual demands of modern marketing strategies. System integration The architecture relies on Django as the core framework, integrating the LLM and stable diffusion Django automatically fires up background Python scripts, which generate subject lines and images. Python scripts also interface with LLMs and stable diffusion models that are responsible for the content creation, pulling it in through Django's ORM into a central database. This means good synchronization between generated content and the marketing campaign behind it. It provides this through Celery, which integrates with resource-intensive tasks, such as generating images that can run asynchronously, keeping the system ready to take on many requests being serviced. Int J Elec & Comp Eng. Vol. No. October 2025: 4875-4888 Int J Elec & Comp Eng ISSN: 2088-8708 Celery facilitates asynchronous execution of tasks-queuing them in a message broker called RabbitMQ for background tasks like image creation to be distributed for performance and horizontal scaling. Further reduction in latency is accomplished by Redis-based caching that minimizes redundant computation by storing previously generated content. We use Django's ORM for efficient handling of database interactions and handling storing all the content generated, relating them back to their respective campaigns. The system architecture is modular by nature, hence scalable, because each component can be scaled independently to manage the increased load. At deployment. Django is integrated with ESPs like Sendgrid and Mailchimp for efficient and direct distribution of e-mail campaigns. EXPERIMENTAL DESIGN AND EVALUATION Experimental setup The performance of the proposed system for the generation of email subject lines and visual content was evaluated using a controlled experimental framework that was designed to be fair, reliable, and relevant for realistic conditions of marketing. Such an experiment was designed to comprehensively test the capabilities of the system in creating contextually appropriate content across a wide variety of product categories and audience profiles, with strict control over variables affecting performance metrics. The aim was to compare it to content produced by humans, more specifically email marketing experts. For this experiment, we picked 5 different products to promote, each from a distinct category. The goal was to test out the subjects and visual creatives generated by the system across several different categories, so the systemAos adaptability to different domains is evaluated. Such diverse selection would make sure that the flexibility and the contextual relevance of the system could be thoroughly tested. These categories included consumer electronics, fashion, skincare, household appliances and insurance. Each product had different requirements related to marketing, including specific tone preferences and visual aesthetic considerations. For instance, consumer electronics required a professional and technical tone, while fashion products needed more creative and visually dynamic content. For each product, the system suggested three different subject lines Aione by each LLMAiand many visual designs. A professional email marketer was responsible of describing the tone and impression of the campaign, and then reviewed the generated content and selected a subject line and visual creative to use. This step ensured that the content complies with marketing standards while showcasing the system's capabilities in generating high-quality, compelling outputs. When it comes to the recipients of the promotional emails, audience segments were formed for each product based on demographic and behavioral data, as is common practice in marketing. Demographic variables included age, gender, and location, while behavioral information consisted of past engagement rates, purchasing history, and browsing activities. Such segmentation criteria allowed for the generation of very specific audience profiles to simulate real-world conditions for the most accurate marketing efforts. System-generated content was sent to these segments, mirroring the segments targeted by human-generated content, thus allowing a fair comparison. For even more fairness, other campaign parameters were set to be the same between the system-generated and human-generated content. All emails were sent at the same time of day and over a consistent period to minimize the underlying influence brought about by timing on open and click-through The email templates, delivery methods, and supplementary design elements remained identical for both test groups. Furthermore, external factors such as promotions were avoided during the testing phase to minimize their impact on results, ensuring a fair evaluation. This experimental setup ensured a rigorous and unbiased evaluation of the systemAos capabilities. testing five different categories of products and holding other conditions constant, this experiment provided good data to determine the impact that the system has on user engagement and marketing outcomes. Furthermore, the comparison with human-generated content provided useful insights about its ability to match, if not outperform, current industry standards and set it as a potentially revolutionary tool for email marketing campaigns. Evaluation metrics The systemAos performance effectiveness was evaluated using key marketing engagement metrics to measure the impact of AI-generated content on user interaction and campaign success. Engagement metrics Oe Open rates: This metric measures the percentage of recipients who opened emails, indicating how well AI-generated subject lines capture user attention, as it is the first thing the user sees and determines whether or not heAoll continue exploring the email. Oe Click-through rates: CTR assesses the percentage of users who clicked links in the email, reflecting the engagement level with the visual content of the email. AI-driven integrated system for comprehensive email marketing automation (Soumaya Loukil. A ISSN: 2088-8708 Oe Conversion rates: Conversion rates track the percentage of users who complete actions like making a purchase or subscribing to a newsletter, providing an overall measure of a marketing campaign success. Oe These metrics are real-life, precise numbers that allowed direct comparisons between AI and humangenerated content in different marketing scenarios. A/B testing A/B testing compared AI-generated content to human-crafted alternatives, with random groups receiving either AI or human content. A t-test was conducted to determine if differences in open, click-through, and conversion rates were statistically significant. This combination of metrics and statistical validation comprehensively evaluated the systemAos performance. RESULTS AND DISCUSSION Results overview Table 1 compares the open rates obtained through human-written subject lines against those that are generated by our framework across different product categories. The data shows that AI-generated content significantly improves open rates across all product categories, with an average increase of 46. Consumer electronics experienced the highest improvement ( 71. 35%), while Fashion had the lowest ( 30. 58%). These results demonstrate the effectiveness of AI in crafting engaging subject lines that capture user interest. Table 2 presents the CTR for the same campaigns, allowing a comparative analysis between human-written and AI-generated content. AI-driven content increased click-through rates across all product categories, with an overall average improvement of 56. Fashion recorded the highest gain ( 64. 05%), followed closely by Skincare ( 60. 14%). These results indicate that AI-generated visuals and subject lines create more compelling email We summarize the conversion rates associated with each approach in Table 3. Conversion rates improved notably with the use of AI, with an average increase of 51. Consumer electronics achieved the highest improvement ( 60. 6%), while Insurance saw the lowest gain ( 43. 7%). The data highlights AI's impact in motivating users to complete desired actions, such as making purchases. Table 1. Open rates by product Product category Consumer electronics Fashion Skincare Household appliances Insurance Overall average Open rate (Manua. Open rate (AI) Improvement (%) Table 2. Click-through rates (CTR) by product Product category Consumer electronics Fashion Skincare Household Appliances Insurance Overall Average Click-through rate (Manua. Click-through rate (AI) Improvement (%) 57% Table 3. Conversion rates by product Product category Consumer electronics Fashion Skincare Household appliances Insurance Overall average Conversion rate (Manua. Conversion rate (AI) Improvement (%) Comparative analysis The experimental results demonstrated significant improvements in engagement, click-through rates, and conversion rates when utilizing the integrated system, which combines LLM-generated subject lines with stable diffusion-generated visuals. Compared to traditional, manually created marketing content. Int J Elec & Comp Eng. Vol. No. October 2025: 4875-4888 Int J Elec & Comp Eng ISSN: 2088-8708 the AI-driven system consistently outperformed across all key performance indicators, therefore optimizing marketing outcomes. Open rates for email campaigns sent via the AI system saw a growth of 46. This shows that LLM-generated subject lines capture user interest more, by resonating with different audience segments. More notably, consumer electronics emails improved with the highest open rates, reaching 71. demonstrating AIAos effectiveness in improving technical and professional content creation. The CTR increased by 56. 6% on average, showing that images designed by AI were more attractive and compelling to customers. Products from the fashion category showed the highest CTR increase at 06%, underlining the important role that engaging visuals play in convincing recipients to further explore the contents of an email. The results prove that AI can deliver consistent and dynamic marketing material that encourages greater user interaction. Conversion rates, which measure the percentage of users completing a desired action, saw an average increase of 51. This indicates that the personalized subject lines and engaging visuals generated by the AI system directly influenced purchasing decisions and other targeted actions. Consumer electronics campaigns saw the biggest conversion improvement at 60. 6%, while Insurance campaigns improved with more modest gains of 43. 7%, indicating that further refinements may be needed for more conservative domains Ae or perhaps those asking for personal information from users. Apart from engagement improvements, the system showed remarkable time efficiency: content creation was 70% faster, and A/B testing processes finished 75% faster than traditional methods. This efficiency enables marketers to deploy campaigns more rapidly without compromising quality, offering a competitive edge in fast-paced markets. Finally, a breakdown of engagement metrics by content element revealed that AI-generated main visuals performed exceptionally well, with a 46% increase in click rates compared to manual visuals. Subject lines and call-to-actions (CTA. also showed improvements of 56% and 51%, respectively, further affirming the AIAos holistic impact on user engagement. All in all, the proposed system with fine-tuned LLMs and stable diffusion models outperformed human effort in creating compelling subject lines and visual content for email marketing. It showed significant improvement in all main metrics: open, click-through, and conversion rates, while increasing efficiency, at least time-wise. These results confirm the role of generative AI as a game-changer in marketing, given that it can produce high-quality, contextually correct material. Theoretical contributions Knowledge graph and vector embedding integration with generative AI represents a serious theoretical leap to diffusion models. Diffusion models, as understood thus far, would create visuals based only on the text inputted into them. It is from the knowledge graphs that relationships of ideas are realized by the system, while the vector embedding translates this to forms that the models can understand. This will allow the creation of much more contextually relevant and personally targeted marketing visuals. In return, the LLMs benefit by producing linguistically correct subject lines, deeply aligned with the purposes of the Each field has its own specific details one should curate so it is impactful, and inculcating email marketing to already highly trained LLMs gives them the edge to generate marketing textual content. While these developments enable more personalization, they do raise ethical concerns, mainly with respect to user privacy and autonomy. Too much personalization makes users feel victimized and may thus lead to trust issues. Finding the balance between offering personalization and respecting the userAos privacy is crucial when it comes to training these models. Another important risk is bias in training data. If the training data from both the LLMs and diffusion models are not diverse, then these models run the risk of reflecting unintended biases. Again, in the case of marketing, biased content alienates or misrepresents certain groups of demographics. Ensuring that our training data is diverse and introducing mechanisms for the detection of bias is crucial for ensuring the fairness of our AI-generated content. To prevent this from happening, it is important to carefully curate the training datasets so they include a broad range of demographics, cultural contexts, and behavioral patterns. To minimize such discriminatory outputs, techniques such as fairness constraints and bias detection algorithms should be integrated in the development pipeline. It is also key to set up periodic audits of generated content and get feedback from diverse user groups, so emerging biases are identified the moment they appear. It is a proactive approach that will not only mitigate risks but also enhance user trust and brand reputation in the long term. Also, beyond addressing ethical risks, this study contributes to theory by integrating LLMs and diffusion models into a unified multimodal marketing framework, bridging AI research and practical deployment. Challenges and limitations Some challenges and limitations indeed arose during the implementation of the integrated system. Most outstanding among these is model bias, especially within LLM content generation and in the Stable AI-driven integrated system for comprehensive email marketing automation (Soumaya Loukil. A ISSN: 2088-8708 Diffusion model. This would mean that when biases were encoded into the training data, sometimes less diverse or stereotype-reinforcing content would be generated, especially in the visuals. This involves increasing the diversity of training datasets and integrating bias detection algorithms that minimize such Advanced techniques along the lines of adversarial training or fairness-aware models would potentially help decrease the bias in the generated output of future work. Another challenge was the computational resources required to have multiple large models running in parallel. This was particularly true for image generation in stable diffusion, which being very computationally intensive, resulted in slower performance and computing at great costs. Possible remedies involve model compression through pruning or quantization, and maybe more efficient architecture, such as latent diffusion models. Future work should also consider various distributed computing and cloud scaling strategies that might enable broader access with much greater efficiency. While the integrated models indeed bring several advantages, challenges in terms of model bias and high computational costs further offer scope for improvement. Only then it will be possible to refine the system and expand its practical applications into the domains of marketing and beyond. FUTURE WORK The groundwork for the finetuned LLMs and stable diffusion model can go further than email marketing, and be extended to other digital channels, such as social media and other personalized web These models could adapt social media postings, targeted ads, and website banners for personal attention in all the many ways a user can interact with the system. It will open up the possibility of wider spread within the digital marketing ecosystem through better user engagement across many formats. Embedding sophisticated AI techniques in this regard might provide better results with the system. Reinforcement learning provides opportunities for constant optimization of marketing strategies and dynamically adjusts the content depending on user feedback and engagement metrics. Further integration of generative adversarial networks will enable the generation of more diverse and creative visuals to extend the variety in marketing content and ensure capturing the userAos attention. Of course, this requires great ethical consideration as the system expands. Federated learning can be applied at this level to ensure that artificial intelligence techniques preserve the users' data security and privacy while still fostering personalized content generation. Data protection law compliance-for example, general data protection regulation (GDPR) - will be of prime importance, and this must be set well in stone as the system further goes onto various platforms. Setting guidelines on how to detect and eliminate bias when generating content will help the system keep itself fair and unbiased. Finally, the integration of real-time feedback loops will enable dynamic adaptation to constantly changing user interactions and market trends. This would make the system more responsive to changes in user behavior and preference by conducting real-time analysis of engagement. It would also mean running flexible campaigns where marketers can adjust content based on direct feedback and live performance insights that come in handy in fine-tuning the system for each market situation. CONCLUSION This research further proved the efficacy of integrated AI in personalized email marketing content, coming both from LLMs and diffusion models. The system overcame existing methods based on improved open rates, click-through rates, and conversion rates, confirming once more the value of integrating AI in this field, for a better generation of text and visuals. In such a way, knowledge graphs and vector embeddings can allow contextually relevant and cohesive content. this is a huge leap in generative AI for marketing. This system enables marketers and retailers to automate content creation while improving personalization, campaign efficiency, and engagement - saving both time and cost. However, some of the limitations that were noted included model biases and computational The biases in the training data carry severe risks in terms of diversity and representation for the generated content, whereas the compute-intense nature of generating images has potential scaling limitations. Future work will thus try to mitigate these issues by using more inclusive datasets and leveraging optimization techniques on models, such as pruning or lightweight architectures. Personalization and privacy remain some of the key issues to be handled with due care in the interest of protection of customer data and over-personalization, which can destroy users' trust. In the future, the system will be extended into other digital marketing channels, including social media. more advanced AI techniques will be employed, such as reinforcement learning and GANs, which would further enhance its Moreover, real-time feedback loops will enable dynamic content adaptation to users' interactions for the first time and make it even more responsive to market trends. Int J Elec & Comp Eng. Vol. No. October 2025: 4875-4888 Int J Elec & Comp Eng ISSN: 2088-8708 In the future, the integrated system will surely enable state-of-the-art services within the area of digital marketing and provide a powerful means for personalized content and engagement. In fact, continued research will quite precisely be very necessary in fine-tuning the system for its challenges ahead and in finding new applications within the various digital marketing channels. REFERENCES